[cleanup] [minor] default+cache related
diff --git a/buying/doctype/supplier/supplier.py b/buying/doctype/supplier/supplier.py
index 2435d0c..bef8665 100644
--- a/buying/doctype/supplier/supplier.py
+++ b/buying/doctype/supplier/supplier.py
@@ -151,8 +151,7 @@
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 e43fbfc..a5db729 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 @@
"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 49296b0..23312ec 100644
--- a/selling/doctype/customer/customer.py
+++ b/selling/doctype/customer/customer.py
@@ -144,8 +144,7 @@
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()