mirror of
https://github.com/frappe/erpnext.git
synced 2026-09-16 02:11:39 +00:00
Merge pull request #57784 from frappe/mergify/bp/version-15-hotfix/pr-57772
fix(accounts): skip party dashboard without invoice permission (backport #57772)
This commit is contained in:
@@ -849,9 +849,11 @@ def validate_account_party_type(self):
|
|||||||
|
|
||||||
|
|
||||||
def get_dashboard_info(party_type, party, loyalty_program=None):
|
def get_dashboard_info(party_type, party, loyalty_program=None):
|
||||||
current_fiscal_year = get_fiscal_year(nowdate(), as_dict=True)
|
|
||||||
|
|
||||||
doctype = "Sales Invoice" if party_type == "Customer" else "Purchase Invoice"
|
doctype = "Sales Invoice" if party_type == "Customer" else "Purchase Invoice"
|
||||||
|
if not frappe.has_permission(doctype, "read"):
|
||||||
|
return None
|
||||||
|
|
||||||
|
current_fiscal_year = get_fiscal_year(nowdate(), as_dict=True)
|
||||||
|
|
||||||
companies = frappe.get_list(
|
companies = frappe.get_list(
|
||||||
doctype, filters={"docstatus": 1, party_type.lower(): party}, distinct=1, fields=["company"]
|
doctype, filters={"docstatus": 1, party_type.lower(): party}, distinct=1, fields=["company"]
|
||||||
|
|||||||
Reference in New Issue
Block a user