def on_update(self): # add to _comment property of the doctype, so it shows up in # comments count for the list view update_comment_in_doc(self) if self.comment_type != 'Updated': update_parent_document_on_communication(self) self.bot_reply()
def on_update(self): # add to _comment property of the doctype, so it shows up in # comments count for the list view update_comment_in_doc(self) if self.comment_type != 'Updated': update_parent_mins_to_first_response(self) self.bot_reply()
def execute(): for d in frappe.db.get_all("Communication", fields=[ 'name', 'reference_doctype', 'reference_name', 'SUBSTRING(content,1,102)', 'communication_type' ], filters={ "reference_name": None, "reference_doctype": None, 'communication_type': 'Communication' }): try: update_comment_in_doc(d) except frappe.ImplicitCommitError: pass