fix: BOM Update Tool failing due to Too Many Writes error
This commit is contained in:
parent
1bd83e69ee
commit
c8eea556d1
@ -90,6 +90,7 @@ def update_latest_price_in_all_boms():
|
|||||||
update_cost()
|
update_cost()
|
||||||
|
|
||||||
def replace_bom(args):
|
def replace_bom(args):
|
||||||
|
frappe.db.auto_commit_on_many_writes = 1
|
||||||
args = frappe._dict(args)
|
args = frappe._dict(args)
|
||||||
|
|
||||||
doc = frappe.get_doc("BOM Update Tool")
|
doc = frappe.get_doc("BOM Update Tool")
|
||||||
@ -97,6 +98,8 @@ def replace_bom(args):
|
|||||||
doc.new_bom = args.new_bom
|
doc.new_bom = args.new_bom
|
||||||
doc.replace_bom()
|
doc.replace_bom()
|
||||||
|
|
||||||
|
frappe.db.auto_commit_on_many_writes = 0
|
||||||
|
|
||||||
def update_cost():
|
def update_cost():
|
||||||
frappe.db.auto_commit_on_many_writes = 1
|
frappe.db.auto_commit_on_many_writes = 1
|
||||||
bom_list = get_boms_in_bottom_up_order()
|
bom_list = get_boms_in_bottom_up_order()
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user