mirror of
https://github.com/frappe/erpnext.git
synced 2026-08-12 22:21:50 +00:00
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:
@@ -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"))
|
||||
|
||||
|
||||
@@ -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,
|
||||
|
||||
Reference in New Issue
Block a user