From a1299dd6525f140d3d3e986ae57c407a8514481b Mon Sep 17 00:00:00 2001 From: Anand Doshi Date: Tue, 16 Jul 2013 20:56:38 +0530 Subject: [PATCH] [minor] fixed patch --- patches/may_2013/p08_change_item_wise_tax.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/patches/may_2013/p08_change_item_wise_tax.py b/patches/may_2013/p08_change_item_wise_tax.py index dbb949e3b2..fd74dcbdbb 100644 --- a/patches/may_2013/p08_change_item_wise_tax.py +++ b/patches/may_2013/p08_change_item_wise_tax.py @@ -3,6 +3,8 @@ import json from webnotes.utils import flt def execute(): + webnotes.conn.auto_commit_on_many_writes = 1 + for doctype in ["Purchase Taxes and Charges", "Sales Taxes and Charges"]: for tax_name, item_wise_tax_detail in \ webnotes.conn.sql("""select name, item_wise_tax_detail from `tab%s`""" % doctype): @@ -20,4 +22,6 @@ def execute(): if out: webnotes.conn.sql("""update `tab%s` set item_wise_tax_detail=%s - where name=%s""" % (doctype, "%s", "%s"), (json.dumps(out), tax_name)) \ No newline at end of file + where name=%s""" % (doctype, "%s", "%s"), (json.dumps(out), tax_name)) + + webnotes.conn.auto_commit_on_many_writes = 0 \ No newline at end of file