autocommit for price list update
This commit is contained in:
parent
29abc389eb
commit
41cd5a68f4
@ -51,6 +51,7 @@ class DocType:
|
|||||||
|
|
||||||
# update prices in Price List
|
# update prices in Price List
|
||||||
def update_prices(self):
|
def update_prices(self):
|
||||||
|
webnotes.conn.auto_commit_on_many_writes = 1
|
||||||
import csv
|
import csv
|
||||||
data = csv.reader(self.get_csv_data().splitlines())
|
data = csv.reader(self.get_csv_data().splitlines())
|
||||||
|
|
||||||
@ -84,6 +85,7 @@ class DocType:
|
|||||||
msgprint("[Ignored] Incorrect format: %s" % str(line))
|
msgprint("[Ignored] Incorrect format: %s" % str(line))
|
||||||
|
|
||||||
msgprint("<b>%s</b> items updated" % updated)
|
msgprint("<b>%s</b> items updated" % updated)
|
||||||
|
webnotes.conn.auto_commit_on_many_writes = 0
|
||||||
|
|
||||||
# clear prices
|
# clear prices
|
||||||
def clear_prices(self):
|
def clear_prices(self):
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user