Fix account's master type
This commit is contained in:
parent
43ffa64849
commit
05b56d0d08
@ -73,3 +73,4 @@ execute:frappe.delete_doc("DocType", "Payment to Invoice Matching Tool Detail")
|
||||
execute:frappe.delete_doc("Page", "trial-balance") #2014-07-22
|
||||
erpnext.patches.v4_2.delete_old_print_formats #2014-07-29
|
||||
erpnext.patches.v4_2.toggle_rounded_total #2014-07-30
|
||||
erpnext.patches.v4_2.fix_account_master_type
|
||||
|
12
erpnext/patches/v4_2/fix_account_master_type.py
Normal file
12
erpnext/patches/v4_2/fix_account_master_type.py
Normal file
@ -0,0 +1,12 @@
|
||||
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
||||
# License: GNU General Public License v3. See license.txt
|
||||
|
||||
from __future__ import unicode_literals
|
||||
import frappe
|
||||
|
||||
def execute():
|
||||
for d in frappe.db.sql("""select name from `tabAccount`
|
||||
where ifnull(master_type, '') not in ('Customer', 'Supplier', 'Employee', '')"""):
|
||||
ac = frappe.get_doc("Account", d[0])
|
||||
ac.master_type = None
|
||||
ac.save()
|
Loading…
x
Reference in New Issue
Block a user