mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-19 19:37:56 +00:00
Merge pull request #56194 from frappe/mergify/bp/version-16-hotfix/pr-56191
fix: added missing permission validation on whitelisted function and removed unnecessary whitelisted decorator (backport #56191)
This commit is contained in:
@@ -616,6 +616,10 @@ def calculate_exchange_rate_using_last_gle(company, account, party_type, party):
|
|||||||
def get_account_details(
|
def get_account_details(
|
||||||
company, posting_date, account, party_type=None, party=None, rounding_loss_allowance: float | None = None
|
company, posting_date, account, party_type=None, party=None, rounding_loss_allowance: float | None = None
|
||||||
):
|
):
|
||||||
|
if not account:
|
||||||
|
return
|
||||||
|
frappe.has_permission("Account", doc=account, throw=True)
|
||||||
|
|
||||||
if not (company and posting_date):
|
if not (company and posting_date):
|
||||||
frappe.throw(_("Company and Posting Date is mandatory"))
|
frappe.throw(_("Company and Posting Date is mandatory"))
|
||||||
|
|
||||||
|
|||||||
@@ -146,7 +146,6 @@ def get_appropriate_company(filters):
|
|||||||
return company
|
return company
|
||||||
|
|
||||||
|
|
||||||
@frappe.whitelist()
|
|
||||||
def get_invoiced_item_gross_margin(sales_invoice=None, item_code=None, company=None, with_item_data=False):
|
def get_invoiced_item_gross_margin(sales_invoice=None, item_code=None, company=None, with_item_data=False):
|
||||||
from erpnext.accounts.report.gross_profit.gross_profit import GrossProfitGenerator
|
from erpnext.accounts.report.gross_profit.gross_profit import GrossProfitGenerator
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user