[fix] [communication] on communication send, update status
This commit is contained in:
parent
090d410498
commit
d01f0cb46e
@ -15,7 +15,12 @@ class DocType(TransactionBase):
|
||||
return webnotes.conn.get_value('Jobs Email Settings',None,'email_id')
|
||||
|
||||
def on_communication_sent(self, comm):
|
||||
webnotes.conn.set(self.doc, 'status', 'Replied')
|
||||
if webnotes.conn.get_value("Profile", comm.sender, "user_type")=="System User":
|
||||
status = "Replied"
|
||||
else:
|
||||
status = "Open"
|
||||
|
||||
webnotes.conn.set(self.doc, 'status', status)
|
||||
|
||||
def on_trash(self):
|
||||
webnotes.conn.sql("""delete from `tabCommunication`
|
||||
|
@ -29,7 +29,12 @@ class DocType(SellingController):
|
||||
self.doc.fields["__is_customer"] = customer
|
||||
|
||||
def on_communication_sent(self, comm):
|
||||
webnotes.conn.set(self.doc, 'status', 'Replied')
|
||||
if webnotes.conn.get_value("Profile", comm.sender, "user_type")=="System User":
|
||||
status = "Replied"
|
||||
else:
|
||||
status = "Open"
|
||||
|
||||
webnotes.conn.set(self.doc, 'status', status)
|
||||
|
||||
def check_status(self):
|
||||
chk = sql("select status from `tabLead` where name=%s", self.doc.name)
|
||||
|
@ -34,7 +34,10 @@ class DocType(TransactionBase):
|
||||
clear(self.doc.doctype, self.doc.name)
|
||||
|
||||
def on_communication_sent(self, comm):
|
||||
self.doc.status = "Waiting for Customer"
|
||||
if webnotes.conn.get_value("Profile", comm.sender, "user_type")=="System User":
|
||||
self.doc.status = "Waiting for Customer"
|
||||
else:
|
||||
self.doc.status = "Open"
|
||||
self.update_status()
|
||||
self.doc.save()
|
||||
|
||||
|
@ -13,7 +13,12 @@ class DocType(TransactionBase):
|
||||
self.doclist = doclist
|
||||
|
||||
def on_communication_sent(self, comm):
|
||||
webnotes.conn.set(self.doc, 'status', 'Replied')
|
||||
if webnotes.conn.get_value("Profile", comm.sender, "user_type")=="System User":
|
||||
status = "Replied"
|
||||
else:
|
||||
status = "Open"
|
||||
|
||||
webnotes.conn.set(self.doc, 'status', status)
|
||||
|
||||
def autoname(self):
|
||||
# concat first and last name
|
||||
|
Loading…
Reference in New Issue
Block a user