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")) 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,