feat: co product by product support (#52979)

This commit is contained in:
Mihir Kandoi
2026-03-11 14:46:36 +05:30
committed by GitHub
parent 65c33e6b39
commit f1ac0376fb
53 changed files with 1490 additions and 701 deletions

View File

@@ -819,7 +819,7 @@ class Company(NestedSet):
boms = frappe.db.sql_list("select name from tabBOM where company=%s", self.name)
if boms:
frappe.db.sql("delete from tabBOM where company=%s", self.name)
for dt in ("BOM Operation", "BOM Item", "BOM Scrap Item", "BOM Explosion Item"):
for dt in ("BOM Operation", "BOM Item", "BOM Secondary Item", "BOM Explosion Item"):
frappe.db.sql(
"delete from `tab{}` where parent in ({})".format(dt, ", ".join(["%s"] * len(boms))),
tuple(boms),