From 48822f6feefe0dbbcae9efcb746e8375de3b10b9 Mon Sep 17 00:00:00 2001 From: Rohit Waghchaure Date: Mon, 7 Apr 2025 14:24:13 +0530 Subject: [PATCH] fix: removed hardcoded search fields to fix performance issue (cherry picked from commit 216bf2456e696ad4079ef268b3e0e788f97ecb02) # Conflicts: # erpnext/manufacturing/doctype/bom/bom.py --- erpnext/manufacturing/doctype/bom/bom.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/erpnext/manufacturing/doctype/bom/bom.py b/erpnext/manufacturing/doctype/bom/bom.py index 7f2d2acc00d..5aacda01c1b 100644 --- a/erpnext/manufacturing/doctype/bom/bom.py +++ b/erpnext/manufacturing/doctype/bom/bom.py @@ -1496,11 +1496,16 @@ def item_query(doctype, txt, searchfield, start, page_len, filters): fields = ["name", "item_name", "item_group", "description"] fields.extend([field for field in searchfields if field not in ["name", "item_group", "description"]]) +<<<<<<< HEAD searchfields = searchfields + [ field for field in [searchfield or "name", "item_code", "item_group", "item_name"] if field not in searchfields ] +======= + if not searchfields: + searchfields = ["name"] +>>>>>>> 216bf2456e (fix: removed hardcoded search fields to fix performance issue) query_filters = {"disabled": 0, "ifnull(end_of_life, '3099-12-31')": (">", today())}