Skip to content

Commit 83aeb2e

Browse files
ljain112mergify[bot]
authored andcommitted
fix: User permissions in financial statements
(cherry picked from commit a626372)
1 parent 2b27892 commit 83aeb2e

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

erpnext/accounts/report/financial_statements.py

+10-1
Original file line numberDiff line numberDiff line change
@@ -527,7 +527,16 @@ def get_accounting_entries(
527527
account_filter_query = get_account_filter_query(root_lft, root_rgt, root_type, gl_entry)
528528
query = query.where(ExistsCriterion(account_filter_query))
529529

530-
entries = query.run(as_dict=True)
530+
query = query.get_sql()
531+
532+
from frappe.desk.reportview import build_match_conditions
533+
534+
match_conditions = build_match_conditions(doctype)
535+
536+
if match_conditions:
537+
query += "and" + match_conditions
538+
539+
entries = frappe.db.sql(query, as_dict=True)
531540

532541
return entries
533542

0 commit comments

Comments
 (0)