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

This commit is contained in:
Anand Doshi
2013-09-04 17:38:29 +05:30
parent 090d410498
commit d01f0cb46e
4 changed files with 22 additions and 4 deletions

View File

@@ -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`