[minor] fixed patch
This commit is contained in:
parent
d618b6e1ab
commit
a1299dd652
@ -3,6 +3,8 @@ import json
|
|||||||
from webnotes.utils import flt
|
from webnotes.utils import flt
|
||||||
|
|
||||||
def execute():
|
def execute():
|
||||||
|
webnotes.conn.auto_commit_on_many_writes = 1
|
||||||
|
|
||||||
for doctype in ["Purchase Taxes and Charges", "Sales Taxes and Charges"]:
|
for doctype in ["Purchase Taxes and Charges", "Sales Taxes and Charges"]:
|
||||||
for tax_name, item_wise_tax_detail in \
|
for tax_name, item_wise_tax_detail in \
|
||||||
webnotes.conn.sql("""select name, item_wise_tax_detail from `tab%s`""" % doctype):
|
webnotes.conn.sql("""select name, item_wise_tax_detail from `tab%s`""" % doctype):
|
||||||
@ -20,4 +22,6 @@ def execute():
|
|||||||
|
|
||||||
if out:
|
if out:
|
||||||
webnotes.conn.sql("""update `tab%s` set item_wise_tax_detail=%s
|
webnotes.conn.sql("""update `tab%s` set item_wise_tax_detail=%s
|
||||||
where name=%s""" % (doctype, "%s", "%s"), (json.dumps(out), tax_name))
|
where name=%s""" % (doctype, "%s", "%s"), (json.dumps(out), tax_name))
|
||||||
|
|
||||||
|
webnotes.conn.auto_commit_on_many_writes = 0
|
Loading…
x
Reference in New Issue
Block a user