From f0a19a276320f1fb8514991212453428c65ac7ff Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 26 Nov 2012 14:52:13 +0530 Subject: [PATCH 1/2] added on_trash for support ticket --- support/doctype/support_ticket/support_ticket.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/support/doctype/support_ticket/support_ticket.py b/support/doctype/support_ticket/support_ticket.py index 13bc888509..f0ed650053 100644 --- a/support/doctype/support_ticket/support_ticket.py +++ b/support/doctype/support_ticket/support_ticket.py @@ -146,4 +146,8 @@ class DocType(TransactionBase): def reopen_ticket(self): webnotes.conn.set(self.doc,'status','Open') - update_feed(self.doc) + update_feed(self.doc) + + def on_trash(self): + webnotes.conn.sql("""update `tabCommunication set support_ticket="" + where support_ticket=%s`""", self.doc.name) From 21df1479a7187b30b7cf96593c092ddd936d73f1 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Mon, 26 Nov 2012 15:18:36 +0530 Subject: [PATCH 2/2] reload_doc can now do doctypes, update patch --- patches/october_2012/remove_old_customer_contact_address.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/patches/october_2012/remove_old_customer_contact_address.py b/patches/october_2012/remove_old_customer_contact_address.py index 17674ce72a..1c62a68229 100644 --- a/patches/october_2012/remove_old_customer_contact_address.py +++ b/patches/october_2012/remove_old_customer_contact_address.py @@ -2,6 +2,6 @@ def execute(): import webnotes webnotes.conn.sql("""delete from `tabSearch Criteria` \ where name = 'customer_address_contact'""") - - from webnotes.modules import reload_doc - reload_doc('selling', 'report', 'customer_addresses_and_contacts') \ No newline at end of file + + webnotes.reload_doc("core", "doctype", "report") + webnotes.reload_doc('selling', 'report', 'customer_addresses_and_contacts') \ No newline at end of file