From 28b58a44655518725d5782b0cfedb32dc2816e78 Mon Sep 17 00:00:00 2001 From: Noah Jacob Date: Mon, 27 Sep 2021 22:34:27 +0530 Subject: [PATCH] fix(ux): added exception of template item in filters (#27560) (cherry picked from commit 5c249decbb79c5b9436aa7a0f5ca6670993e143e) # Conflicts: # erpnext/manufacturing/doctype/bom/bom.py --- erpnext/manufacturing/doctype/bom/bom.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 1a56116718d..a33b4ced437 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -1346,6 +1346,7 @@ def item_query(doctype, txt, searchfield, start, page_len, filters): if not has_variants: query_filters["has_variants"] = 0 +<<<<<<< HEAD if filters: for fieldname, value in filters.items(): query_filters[fieldname] = value @@ -1360,6 +1361,11 @@ def item_query(doctype, txt, searchfield, start, page_len, filters): limit_page_length=page_len, as_list=1, ) +======= + if filters and filters.get("is_stock_item"): + or_cond_filters["is_stock_item"] = 1 + or_cond_filters["has_variants"] = 1 +>>>>>>> 5c249decbb (fix(ux): added exception of template item in filters (#27560)) @frappe.whitelist()