From 9bf1e847d2cf97d2700e5a1e9b1c339c083fd712 Mon Sep 17 00:00:00 2001 From: diptanilsaha Date: Sat, 20 Jun 2026 19:25:58 +0530 Subject: [PATCH 1/2] fix(err): add missing permission check on `get_account_details` --- .../exchange_rate_revaluation/exchange_rate_revaluation.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py index 9851cc5a20c..a5d5b5b3be1 100644 --- a/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py +++ b/erpnext/accounts/doctype/exchange_rate_revaluation/exchange_rate_revaluation.py @@ -626,6 +626,8 @@ def get_account_details( party: str | None = None, rounding_loss_allowance: float = 0.0, ): + frappe.has_permission("Account", doc=account, throw=True) + if not (company and posting_date): frappe.throw(_("Company and Posting Date is mandatory")) From e29535f29c50db187138585d11d5fabf3428598c Mon Sep 17 00:00:00 2001 From: diptanilsaha Date: Sat, 20 Jun 2026 19:28:20 +0530 Subject: [PATCH 2/2] fix(report_utils): remove unnecessary whitelist decorator on `get_invoiced_item_gross_margin` --- erpnext/accounts/report/utils.py | 1 - 1 file changed, 1 deletion(-) diff --git a/erpnext/accounts/report/utils.py b/erpnext/accounts/report/utils.py index 58ee9d211a6..ddbadd8a38e 100644 --- a/erpnext/accounts/report/utils.py +++ b/erpnext/accounts/report/utils.py @@ -146,7 +146,6 @@ def get_appropriate_company(filters): return company -@frappe.whitelist() def get_invoiced_item_gross_margin( sales_invoice: str | None = None, item_code: str | None = None,