[crm] Updated status and workflow for Lead > Opportunity > Quotation > Sales Order

This commit is contained in:
Rushabh Mehta
2013-10-03 17:26:33 +05:30
parent 43247cedea
commit 800b3aa437
21 changed files with 213 additions and 202 deletions

View File

@@ -54,7 +54,7 @@ Original Query:
def auto_close_tickets(self):
webnotes.conn.sql("""update `tabSupport Ticket` set status = 'Closed'
where status = 'Waiting for Customer'
where status = 'Replied'
and date_sub(curdate(),interval 15 Day) > modified""")
def get_support_mails():

View File

@@ -14,7 +14,7 @@ class DocType(TransactionBase):
def get_sender(self, comm):
return webnotes.conn.get_value('Email Settings',None,'support_email')
def get_subject(self, comm):
return '[' + self.doc.name + '] ' + (comm.subject or 'No Subject Specified')
@@ -35,16 +35,7 @@ class DocType(TransactionBase):
if self.doc.status == "Closed":
from webnotes.widgets.form.assign_to import clear
clear(self.doc.doctype, self.doc.name)
def on_communication(self, comm):
if comm.sender == self.get_sender(comm) or \
webnotes.conn.get_value("Profile", extract_email_id(comm.sender), "user_type")=="System User":
self.doc.status = "Waiting for Customer"
else:
self.doc.status = "Open"
self.update_status()
self.doc.save()
def set_lead_contact(self, email_id):
import email.utils
email_id = email.utils.parseaddr(email_id)

View File

@@ -2,7 +2,7 @@
{
"creation": "2013-02-01 10:36:25",
"docstatus": 0,
"modified": "2013-09-10 10:54:02",
"modified": "2013-10-03 16:45:41",
"modified_by": "Administrator",
"owner": "Administrator"
},
@@ -71,7 +71,7 @@
"no_copy": 1,
"oldfieldname": "status",
"oldfieldtype": "Select",
"options": "\nOpen\nTo Reply\nWaiting for Customer\nHold\nClosed",
"options": "Open\nReplied\nHold\nClosed",
"read_only": 0,
"reqd": 0,
"search_index": 1