fix: merge conflicts
diff --git a/erpnext/controllers/queries.py b/erpnext/controllers/queries.py
index 163ef72..c14bb66 100644
--- a/erpnext/controllers/queries.py
+++ b/erpnext/controllers/queries.py
@@ -179,6 +179,12 @@
# scan description only if items are less than 50000
description_cond = 'or tabItem.description LIKE %(txt)s'
+ extra_cond = " and tabItem.has_variants=0"
+ if (filters and isinstance(filters, dict)
+ and filters.get("doctype") == "BOM"):
+ extra_cond = ""
+ del filters["doctype"]
+
return frappe.db.sql("""select tabItem.name,
if(length(tabItem.item_name) > 40,
concat(substr(tabItem.item_name, 1, 40), "..."), item_name) as item_name,
@@ -188,11 +194,11 @@
{columns}
from tabItem
where tabItem.docstatus < 2
- and tabItem.has_variants=0
and tabItem.disabled=0
and (tabItem.end_of_life > %(today)s or ifnull(tabItem.end_of_life, '0000-00-00')='0000-00-00')
and ({scond} or tabItem.item_code IN (select parent from `tabItem Barcode` where barcode LIKE %(txt)s)
{description_cond})
+ {extra_cond}
{fcond} {mcond}
order by
if(locate(%(_txt)s, name), locate(%(_txt)s, name), 99999),
@@ -203,6 +209,7 @@
key=searchfield,
columns=columns,
scond=searchfields,
+ extra_cond=extra_cond,
fcond=get_filters_cond(doctype, filters, conditions).replace('%', '%%'),
mcond=get_match_cond(doctype).replace('%', '%%'),
description_cond = description_cond),