mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-20 05:29:18 +00:00
[minor] [fix] status updater, only change communication status when called explicitly
This commit is contained in:
@@ -88,17 +88,21 @@ class StatusUpdater(DocListController):
|
||||
webnotes.conn.set_value(self.doc.doctype, self.doc.name, "status", self.doc.status)
|
||||
|
||||
def on_communication(self):
|
||||
self.communication_set = True
|
||||
self.set_status(update=True)
|
||||
del self.communication_set
|
||||
|
||||
def communication_received(self):
|
||||
last_comm = self.doclist.get({"doctype":"Communication"})
|
||||
if last_comm:
|
||||
return last_comm[-1].sent_or_received == "Received"
|
||||
if getattr(self, "communication_set", False):
|
||||
last_comm = self.doclist.get({"doctype":"Communication"})
|
||||
if last_comm:
|
||||
return last_comm[-1].sent_or_received == "Received"
|
||||
|
||||
def communication_sent(self):
|
||||
last_comm = self.doclist.get({"doctype":"Communication"})
|
||||
if last_comm:
|
||||
return last_comm[-1].sent_or_received == "Sent"
|
||||
if getattr(self, "communication_set", False):
|
||||
last_comm = self.doclist.get({"doctype":"Communication"})
|
||||
if last_comm:
|
||||
return last_comm[-1].sent_or_received == "Sent"
|
||||
|
||||
def validate_qty(self):
|
||||
"""
|
||||
|
||||
Reference in New Issue
Block a user