예제 #1
0
    def on_trash(self):
        """Clear communications where email account is linked"""
        from frappe.core.doctype.user.user import remove_user_email_inbox

        frappe.db.sql(
            "update `tabCommunication` set email_account='' where email_account=%s",
            self.name)
        remove_user_email_inbox(email_account=self.name)
예제 #2
0
	def on_trash(self):
		"""Clear communications where email account is linked"""
		from frappe.core.doctype.user.user import remove_user_email_inbox

		frappe.db.sql("update `tabCommunication` set email_account='' where email_account=%s", self.name)
		remove_user_email_inbox(email_account=self.name)