chore: patch to enable old serial/batch fields (#41723)

* chore: patch to enable old serial/batch fields

* chore: fix linters issue
This commit is contained in:
rohitwaghchaure
2024-06-10 19:08:59 +05:30
committed by GitHub
parent d9ddad0f1f
commit 7ce9f7bc12
2 changed files with 8 additions and 0 deletions

View File

@@ -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

View File

@@ -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)