[fix] dynamic link in BOM Search report
diff --git a/erpnext/stock/report/bom_search/bom_search.py b/erpnext/stock/report/bom_search/bom_search.py
index cf1e339..3e803fb 100644
--- a/erpnext/stock/report/bom_search/bom_search.py
+++ b/erpnext/stock/report/bom_search/bom_search.py
@@ -6,6 +6,11 @@
def execute(filters=None):
data = []
+ parents = {
+ "Sales BOM Item": "Sales BOM",
+ "BOM Explosion Item": "BOM",
+ "BOM Item": "BOM"
+ }
for doctype in ("Sales BOM Item",
"BOM Explosion Item" if filters.search_sub_assemblies else "BOM Item"):
@@ -21,7 +26,7 @@
valid = False
if valid:
- data.append((parent, doctype[:-5]))
+ data.append((parent, parents[doctype]))
return [{
"fieldname": "parent",