mirror of
https://github.com/frappe/erpnext.git
synced 2026-05-19 04:59:18 +00:00
fix: Comment description
This commit is contained in:
@@ -756,13 +756,13 @@ def get_party_details(company, party_type, party, date, cost_center=None):
|
|||||||
def get_account_details(account, date, cost_center=None):
|
def get_account_details(account, date, cost_center=None):
|
||||||
frappe.has_permission('Payment Entry', throw=True)
|
frappe.has_permission('Payment Entry', throw=True)
|
||||||
|
|
||||||
# to check if passed account is accessible under Payment Entry
|
# to check if the passed account is accessible if the reference doctype is Payment Entry
|
||||||
# There might be user permissions which can only allow account under certain doctypes
|
|
||||||
# except Payment Entry
|
|
||||||
account_list = frappe.get_list('Account', {
|
account_list = frappe.get_list('Account', {
|
||||||
'name': account
|
'name': account
|
||||||
}, reference_doctype='Payment Entry', limit=1)
|
}, reference_doctype='Payment Entry', limit=1)
|
||||||
|
|
||||||
|
# There might be some user permissions which will allow account under certain doctypes
|
||||||
|
# except for Payment Entry, only in such case we should throw permission error
|
||||||
if not account_list:
|
if not account_list:
|
||||||
frappe.throw(_('Account: {0} is not permitted under Payment Entry').format(account))
|
frappe.throw(_('Account: {0} is not permitted under Payment Entry').format(account))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user