From a83e36b8013f49b74cad41d90d9d0f685bc691e6 Mon Sep 17 00:00:00 2001 From: Dhananjay Palshikar Date: Thu, 1 Sep 2022 19:07:13 +0530 Subject: [PATCH] Allow Item Templates in Work Order Items Item Variants can be a part of the items tables, however, when BOM items are fetched to be a part of the Work Order items, item variants were being filtered out. The filtering out does not serve a purpose. Having Item variants in BOMs allows for template like behaviour. (cherry picked from commit 75396c02d28c37eeb44d2429e51d3b9f55a39fe9) --- erpnext/manufacturing/doctype/bom/bom.py | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 70637d3ef20..ff84991c36e 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -1019,7 +1019,6 @@ def get_bom_items_as_dict( where bom_item.docstatus < 2 and bom.name = %(bom)s - and ifnull(item.has_variants, 0) = 0 and item.is_stock_item in (1, {is_stock_item}) {where_conditions} group by item_code, stock_uom