fix(ux): added exception of template item in filters (#27560)

diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py
index 232e3a0..7cfec97 100644
--- a/erpnext/manufacturing/doctype/bom/bom.py
+++ b/erpnext/manufacturing/doctype/bom/bom.py
@@ -1133,7 +1133,8 @@
 			query_filters["has_variants"] = 0
 
 	if filters and filters.get("is_stock_item"):
-		query_filters["is_stock_item"] = 1
+		or_cond_filters["is_stock_item"] = 1
+		or_cond_filters["has_variants"] = 1
 
 	return frappe.get_list("Item",
 		fields = fields, filters=query_filters,