Show Frozen field in account to all if Frozen Account Modifier is not specified in Accounts Settings
This commit is contained in:
parent
00778c9a1e
commit
500e1bc9b5
@ -11,8 +11,9 @@ class Account(Document):
|
|||||||
nsm_parent_field = 'parent_account'
|
nsm_parent_field = 'parent_account'
|
||||||
|
|
||||||
def onload(self):
|
def onload(self):
|
||||||
frozen_accounts_modifier = frappe.db.get_value("Accounts Settings", "Accounts Settings", "frozen_accounts_modifier")
|
frozen_accounts_modifier = frappe.db.get_value("Accounts Settings", "Accounts Settings",
|
||||||
if frozen_accounts_modifier in frappe.user.get_roles():
|
"frozen_accounts_modifier")
|
||||||
|
if not frozen_accounts_modifier or frozen_accounts_modifier in frappe.user.get_roles():
|
||||||
self.get("__onload").can_freeze_account = True
|
self.get("__onload").can_freeze_account = True
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user