From 513f13df272de2ceb190d898204753eafbeedf47 Mon Sep 17 00:00:00 2001 From: Zlash65 Date: Mon, 14 May 2018 16:05:16 +0530 Subject: [PATCH] patch fix --- .../patches/v11_0/rename_supplier_type_to_supplier_group.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/erpnext/patches/v11_0/rename_supplier_type_to_supplier_group.py b/erpnext/patches/v11_0/rename_supplier_type_to_supplier_group.py index 4db5704ad68..f0907af333e 100644 --- a/erpnext/patches/v11_0/rename_supplier_type_to_supplier_group.py +++ b/erpnext/patches/v11_0/rename_supplier_type_to_supplier_group.py @@ -21,6 +21,9 @@ def execute(): build_tree() def build_tree(): + frappe.db.sql("""update `tabSupplier Group` set parent_supplier_group = '{0}' + where is_group = 0""".format(_('All Supplier Groups'))) + if not frappe.db.exists("Supplier Group", _('All Supplier Groups')): frappe.get_doc({ 'doctype': 'Supplier Group', @@ -28,7 +31,4 @@ def build_tree(): 'is_group': 1 }).insert(ignore_permissions=True) - frappe.db.sql("""update `tabSupplier Group` set parent_supplier_group = '{0}' - where is_group = 0""".format(_('All Supplier Groups'))) - rebuild_tree("Supplier Group", "parent_supplier_group")