patch fix
This commit is contained in:
parent
39097c7fbe
commit
513f13df27
@ -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")
|
||||
|
Loading…
x
Reference in New Issue
Block a user