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

(cherry picked from commit 5c249decbb)

# Conflicts:
#	erpnext/manufacturing/doctype/bom/bom.py
This commit is contained in:
Noah Jacob
2021-09-27 22:34:27 +05:30
committed by Mergify
parent f5160dc83d
commit 28b58a4465

View File

@@ -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()