mirror of
https://github.com/frappe/erpnext.git
synced 2026-02-12 17:23:38 +00:00
Merge pull request #51019 from mihir-kandoi/gh50781
This commit is contained in:
@@ -845,7 +845,10 @@ 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}):
|
||||
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})
|
||||
):
|
||||
wo_order = frappe.new_doc("Work Order")
|
||||
wo_order.update(
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user