From 57518fc5f1a76f0d0d7f5ee69f19b8e82f7f2516 Mon Sep 17 00:00:00 2001 From: Rushabh Mehta Date: Wed, 27 Nov 2013 15:05:52 +0530 Subject: [PATCH] [cleanup] [minor] default+cache related --- buying/doctype/supplier/supplier.py | 3 +-- patches/december_2012/deprecate_tds.py | 3 +-- selling/doctype/customer/customer.py | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/buying/doctype/supplier/supplier.py b/buying/doctype/supplier/supplier.py index 2435d0cc31..bef86650c5 100644 --- a/buying/doctype/supplier/supplier.py +++ b/buying/doctype/supplier/supplier.py @@ -151,8 +151,7 @@ class DocType(TransactionBase): acc = webnotes.conn.sql("select name from `tabAccount` where master_type = 'Supplier' \ and master_name = %s and docstatus < 2", self.doc.name) if acc: - from webnotes.model import delete_doc - delete_doc('Account', acc[0][0]) + webnotes.delete_doc('Account', acc[0][0]) def on_trash(self): self.delete_supplier_address() diff --git a/patches/december_2012/deprecate_tds.py b/patches/december_2012/deprecate_tds.py index e43fbfc482..a5db729d9e 100644 --- a/patches/december_2012/deprecate_tds.py +++ b/patches/december_2012/deprecate_tds.py @@ -3,7 +3,6 @@ def execute(): import webnotes - from webnotes.model import delete_doc from webnotes.model.code import get_obj from webnotes.model.doc import addchild @@ -12,7 +11,7 @@ def execute(): "TDS Rate Chart", "TDS Category", "TDS Control", "TDS Detail", "TDS Payment Detail", "TDS Rate Detail", "TDS Category Account", "Form 16A Ack Detail", "Form 16A Tax Detail"]: - delete_doc("DocType", dt) + webnotes.delete_doc("DocType", dt) webnotes.conn.commit() webnotes.conn.sql("drop table if exists `tab%s`" % dt) diff --git a/selling/doctype/customer/customer.py b/selling/doctype/customer/customer.py index 49296b0b1c..23312ecd67 100644 --- a/selling/doctype/customer/customer.py +++ b/selling/doctype/customer/customer.py @@ -144,8 +144,7 @@ class DocType(TransactionBase): acc = webnotes.conn.sql("select name from `tabAccount` where master_type = 'Customer' \ and master_name = %s and docstatus < 2", self.doc.name) if acc: - from webnotes.model import delete_doc - delete_doc('Account', acc[0][0]) + webnotes.delete_doc('Account', acc[0][0]) def on_trash(self): self.delete_customer_address()