Merge pull request #1851 from nabinhait/v4-hotfix

Show Frozen field in account to all if Frozen Account Modifier is not sp...
This commit is contained in:
Rushabh Mehta 2014-06-26 10:59:27 +05:30
commit 994f0c3d49

View File

@ -11,8 +11,9 @@ class Account(Document):
nsm_parent_field = 'parent_account'
def onload(self):
frozen_accounts_modifier = frappe.db.get_value("Accounts Settings", "Accounts Settings", "frozen_accounts_modifier")
if frozen_accounts_modifier in frappe.user.get_roles():
frozen_accounts_modifier = frappe.db.get_value("Accounts Settings", "Accounts Settings",
"frozen_accounts_modifier")
if not frozen_accounts_modifier or frozen_accounts_modifier in frappe.user.get_roles():
self.get("__onload").can_freeze_account = True