Merge pull request #38585 from frappe/mergify/bp/version-14-hotfix/pr-38580

fix: sql error while filtering on finance book in GL (backport #38580)
This commit is contained in:
ruthra kumar
2023-12-05 15:07:07 +05:30
committed by GitHub

View File

@@ -282,7 +282,8 @@ def get_conditions(filters):
if accounting_dimensions:
for dimension in accounting_dimensions:
if not dimension.disabled:
# Ignore 'Finance Book' set up as dimension in below logic, as it is already handled in above section
if not dimension.disabled and dimension.document_type != "Finance Book":
if filters.get(dimension.fieldname):
if frappe.get_cached_value("DocType", dimension.document_type, "is_tree"):
filters[dimension.fieldname] = get_dimension_with_children(