diff --git a/patches/1401/fix_planned_qty.py b/patches/1401/fix_planned_qty.py index 96f56fb88a..979d94985b 100644 --- a/patches/1401/fix_planned_qty.py +++ b/patches/1401/fix_planned_qty.py @@ -4,7 +4,10 @@ import webnotes def execute(): + webnotes.conn.auto_commit_on_many_writes = 1 from utilities.repost_stock import repost_stock for d in webnotes.conn.sql("""select distinct production_item, fg_warehouse from `tabProduction Order` where docstatus>0""", as_dict=1): - repost_stock(d.production_item, d.fg_warehouse) \ No newline at end of file + repost_stock(d.production_item, d.fg_warehouse) + + webnotes.conn.auto_commit_on_many_writes = 0 \ No newline at end of file