mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-27 08:54:45 +00:00
Fix account's master type
This commit is contained in:
@@ -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
|
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.delete_old_print_formats #2014-07-29
|
||||||
erpnext.patches.v4_2.toggle_rounded_total #2014-07-30
|
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()
|
||||||
Reference in New Issue
Block a user