mirror of
https://github.com/frappe/erpnext.git
synced 2026-03-22 19:55:29 +00:00
@@ -9,10 +9,9 @@ def execute():
|
|||||||
docs = frappe.get_all(
|
docs = frappe.get_all(
|
||||||
"Material Request", filters={"buying_price_list": ["is", "not set"], "docstatus": 1}, pluck="name"
|
"Material Request", filters={"buying_price_list": ["is", "not set"], "docstatus": 1}, pluck="name"
|
||||||
)
|
)
|
||||||
old_limit = frappe.db.MAX_WRITES_PER_TRANSACTION
|
frappe.db.auto_commit_on_many_writes = 1
|
||||||
frappe.db.MAX_WRITES_PER_TRANSACTION *= 4
|
|
||||||
try:
|
try:
|
||||||
for doc in docs:
|
for doc in docs:
|
||||||
frappe.db.set_value("Material Request", doc, "buying_price_list", default_buying_price_list)
|
frappe.db.set_value("Material Request", doc, "buying_price_list", default_buying_price_list)
|
||||||
finally:
|
finally:
|
||||||
frappe.db.MAX_WRITES_PER_TRANSACTION = old_limit
|
frappe.db.auto_commit_on_many_writes = 0
|
||||||
|
|||||||
Reference in New Issue
Block a user