feat: add patch for default batch_size for old records
This commit is contained in:
parent
14ec76e8d9
commit
90fc3aff72
@ -615,3 +615,4 @@ erpnext.patches.v11_1.set_missing_opportunity_from
|
||||
erpnext.patches.v12_0.set_quotation_status
|
||||
erpnext.patches.v12_0.set_priority_for_support
|
||||
erpnext.patches.v12_0.delete_priority_property_setter
|
||||
erpnext.patches.v12_0.set_default_batch_size
|
||||
|
20
erpnext/patches/v12_0/set_default_batch_size.py
Normal file
20
erpnext/patches/v12_0/set_default_batch_size.py
Normal file
@ -0,0 +1,20 @@
|
||||
import frappe
|
||||
|
||||
|
||||
def execute():
|
||||
frappe.reload_doc("manufacturing", "doctype", "bom_operation")
|
||||
frappe.reload_doc("manufacturing", "doctype", "work_order_operation")
|
||||
|
||||
frappe.db.sql("""
|
||||
UPDATE
|
||||
`tabBOM Operation` bo
|
||||
SET
|
||||
bo.batch_size = 1
|
||||
""")
|
||||
frappe.db.sql("""
|
||||
UPDATE
|
||||
`tabWork Order Operation` wop
|
||||
SET
|
||||
wop.batch_size = 1
|
||||
""")
|
||||
frappe.db.commit()
|
Loading…
Reference in New Issue
Block a user