fix: add is_active filter

This commit is contained in:
Mihir Kandoi
2025-12-10 21:53:11 +05:30
committed by GitHub
parent 0bec419301
commit a52f42c7e4

View File

@@ -845,7 +845,7 @@ def raise_work_orders(material_request, company):
for d in mr.items:
if (d.stock_qty - d.ordered_qty) > 0:
if frappe.db.exists("BOM", {"item": d.item_code, "is_default": 1}) or (
if frappe.db.exists("BOM", {"item": d.item_code, "is_default": 1, "is_active": 1}) or (
(variant_of := frappe.get_value("Item", d.item_code, "variant_of"))
and frappe.db.exists("BOM", {"item": variant_of, "is_default": 1, "is_active": 1})
):