diff --git a/erpnext/patches.txt b/erpnext/patches.txt index 4f02329f0a3..114e88d2e40 100644 --- a/erpnext/patches.txt +++ b/erpnext/patches.txt @@ -369,3 +369,4 @@ erpnext.patches.v15_0.rename_purchase_receipt_amount_to_purchase_amount erpnext.patches.v14_0.enable_set_priority_for_pricing_rules #1 erpnext.patches.v15_0.rename_number_of_depreciations_booked_to_opening_booked_depreciations erpnext.patches.v15_0.add_default_operations +erpnext.patches.v15_0.enable_old_serial_batch_fields diff --git a/erpnext/patches/v15_0/enable_old_serial_batch_fields.py b/erpnext/patches/v15_0/enable_old_serial_batch_fields.py new file mode 100644 index 00000000000..f986d9f88b1 --- /dev/null +++ b/erpnext/patches/v15_0/enable_old_serial_batch_fields.py @@ -0,0 +1,7 @@ +import frappe + + +def execute(): + sabb = frappe.get_all("Serial and Batch Bundle", filters={"docstatus": ("<", 2)}, limit=1) + if not sabb: + frappe.db.set_single_value("Stock Settings", "use_serial_batch_fields", 1)