[fix] [communication] on communication send, update status
This commit is contained in:
parent
d01f0cb46e
commit
53ecddd612
@ -14,7 +14,7 @@ class DocType(TransactionBase):
|
|||||||
def get_sender(self, comm):
|
def get_sender(self, comm):
|
||||||
return webnotes.conn.get_value('Jobs Email Settings',None,'email_id')
|
return webnotes.conn.get_value('Jobs Email Settings',None,'email_id')
|
||||||
|
|
||||||
def on_communication_sent(self, comm):
|
def on_communication(self, comm):
|
||||||
if webnotes.conn.get_value("Profile", comm.sender, "user_type")=="System User":
|
if webnotes.conn.get_value("Profile", comm.sender, "user_type")=="System User":
|
||||||
status = "Replied"
|
status = "Replied"
|
||||||
else:
|
else:
|
||||||
|
@ -28,9 +28,10 @@ class DocType(SellingController):
|
|||||||
if customer:
|
if customer:
|
||||||
self.doc.fields["__is_customer"] = customer
|
self.doc.fields["__is_customer"] = customer
|
||||||
|
|
||||||
def on_communication_sent(self, comm):
|
def on_communication(self, comm):
|
||||||
if webnotes.conn.get_value("Profile", comm.sender, "user_type")=="System User":
|
if comm.sender == self.get_sender(comm) or \
|
||||||
status = "Replied"
|
webnotes.conn.get_value("Profile", comm.sender, "user_type")=="System User":
|
||||||
|
status = "Replied"
|
||||||
else:
|
else:
|
||||||
status = "Open"
|
status = "Open"
|
||||||
|
|
||||||
|
@ -33,9 +33,10 @@ class DocType(TransactionBase):
|
|||||||
from webnotes.widgets.form.assign_to import clear
|
from webnotes.widgets.form.assign_to import clear
|
||||||
clear(self.doc.doctype, self.doc.name)
|
clear(self.doc.doctype, self.doc.name)
|
||||||
|
|
||||||
def on_communication_sent(self, comm):
|
def on_communication(self, comm):
|
||||||
if webnotes.conn.get_value("Profile", comm.sender, "user_type")=="System User":
|
if comm.sender == self.get_sender(comm) or \
|
||||||
self.doc.status = "Waiting for Customer"
|
webnotes.conn.get_value("Profile", comm.sender, "user_type")=="System User":
|
||||||
|
self.doc.status = "Waiting for Customer"
|
||||||
else:
|
else:
|
||||||
self.doc.status = "Open"
|
self.doc.status = "Open"
|
||||||
self.update_status()
|
self.update_status()
|
||||||
|
@ -12,7 +12,7 @@ class DocType(TransactionBase):
|
|||||||
self.doc = doc
|
self.doc = doc
|
||||||
self.doclist = doclist
|
self.doclist = doclist
|
||||||
|
|
||||||
def on_communication_sent(self, comm):
|
def on_communication(self, comm):
|
||||||
if webnotes.conn.get_value("Profile", comm.sender, "user_type")=="System User":
|
if webnotes.conn.get_value("Profile", comm.sender, "user_type")=="System User":
|
||||||
status = "Replied"
|
status = "Replied"
|
||||||
else:
|
else:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user