Merge pull request #56191 from diptanilsaha/fix/perms_on_whitelisted_functions

fix: added missing permission validation on whitelisted function and removed unnecessary whitelisted decorator
This commit is contained in:
Diptanil Saha
2026-06-20 19:50:28 +05:30
committed by GitHub
2 changed files with 2 additions and 1 deletions

View File

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

View File

@@ -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,