Update fix_account_master_type.py

This commit is contained in:
Nabin Hait 2014-08-07 19:22:02 +05:30
parent e7f7416190
commit d91cefb23d

View File

@ -6,7 +6,7 @@ import frappe
def execute():
for d in frappe.db.sql("""select name from `tabAccount`
where ifnull(master_type, '') not in ('Customer', 'Supplier', 'Employee', '')"""):
where ifnull(master_type, '') not in ('Customer', 'Supplier', 'Employee', '') and docstatus=0"""):
ac = frappe.get_doc("Account", d[0])
ac.master_type = None
ac.save()