patch fix
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 4db5704..f0907af 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 @@
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 @@
'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")