feat: option to enable serial / batch features

This commit is contained in:
Rohit Waghchaure
2026-02-09 14:51:20 +05:30
parent 2bc3c146a6
commit 82c3da5b1e
16 changed files with 162 additions and 10 deletions

View File

@@ -0,0 +1,9 @@
import frappe
def execute():
if not frappe.get_all("Serial No", limit=1) and not frappe.get_all("Batch", limit=1):
return
frappe.db.set_single_value("Stock Settings", "enable_serial_and_batch_no_for_item", 1)
frappe.db.set_default("enable_serial_and_batch_no_for_item", 1)