[fix] [communication] on communication send, update status

This commit is contained in:
Anand Doshi
2013-09-04 17:52:27 +05:30
parent d01f0cb46e
commit 53ecddd612
4 changed files with 10 additions and 8 deletions

View File

@@ -33,9 +33,10 @@ class DocType(TransactionBase):
from webnotes.widgets.form.assign_to import clear
clear(self.doc.doctype, self.doc.name)
def on_communication_sent(self, comm):
if webnotes.conn.get_value("Profile", comm.sender, "user_type")=="System User":
self.doc.status = "Waiting for Customer"
def on_communication(self, comm):
if comm.sender == self.get_sender(comm) or \
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()