Files
schuetz3-erpnext/erpnext/patches/v15_0/enable_old_serial_batch_fields.py
rohitwaghchaure 7ce9f7bc12 chore: patch to enable old serial/batch fields (#41723)
* chore: patch to enable old serial/batch fields

* chore: fix linters issue
2024-06-10 19:08:59 +05:30

8 lines
214 B
Python

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)