[fix] dynamic link in BOM Search report
This commit is contained in:
parent
b45a6bcb88
commit
bf4547ca5f
@ -6,6 +6,11 @@ import frappe, json
|
||||
|
||||
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 @@ def execute(filters=None):
|
||||
valid = False
|
||||
|
||||
if valid:
|
||||
data.append((parent, doctype[:-5]))
|
||||
data.append((parent, parents[doctype]))
|
||||
|
||||
return [{
|
||||
"fieldname": "parent",
|
||||
|
Loading…
x
Reference in New Issue
Block a user