diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 72db8ad063..f357b3d968 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -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 diff --git a/erpnext/patches/v12_0/set_default_batch_size.py b/erpnext/patches/v12_0/set_default_batch_size.py new file mode 100644 index 0000000000..76a355bcf2 --- /dev/null +++ b/erpnext/patches/v12_0/set_default_batch_size.py @@ -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()