fix: compute tree-view parent field name (#41234)

fix: Fixing treeView lookup incompatibility, see : See https://github.com/frappe/frappe/pull/26199
This commit is contained in:
Fritz
2024-04-30 14:27:58 +02:00
committed by GitHub
parent 378605cd00
commit c3077ee067

View File

@@ -1094,7 +1094,7 @@ def get_companies():
def get_children(doctype, parent, company, is_root=False):
from erpnext.accounts.report.financial_statements import sort_accounts
parent_fieldname = "parent_" + doctype.lower().replace(" ", "_")
parent_fieldname = "parent_" + frappe.scrub(doctype)
fields = ["name as value", "is_group as expandable"]
filters = [["docstatus", "<", 2]]