Allowed frozen_accounts_modifier to create records against frozen customer/supplier

This commit is contained in:
Neil Trini Lasrado
2015-07-24 13:10:50 +05:30
parent 79bf233734
commit cc7cb2a70a
3 changed files with 8 additions and 7 deletions

View File

@@ -346,6 +346,10 @@ class AccountsController(TransactionBase):
return self._abbr
def validate_party(self):
frozen_accounts_modifier = frappe.db.get_value( 'Accounts Settings', None,'frozen_accounts_modifier')
if frozen_accounts_modifier in frappe.get_roles():
return
party_type = None
if self.meta.get_field("customer"):
party_type = 'Customer'