From d91cefb23db4ef118d310f3fca957f420d11983d Mon Sep 17 00:00:00 2001 From: Nabin Hait Date: Thu, 7 Aug 2014 19:22:02 +0530 Subject: [PATCH] Update fix_account_master_type.py --- erpnext/patches/v4_2/fix_account_master_type.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/erpnext/patches/v4_2/fix_account_master_type.py b/erpnext/patches/v4_2/fix_account_master_type.py index 09fa7891d09..d4603f24f59 100644 --- a/erpnext/patches/v4_2/fix_account_master_type.py +++ b/erpnext/patches/v4_2/fix_account_master_type.py @@ -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()