diff options
Diffstat (limited to 'addons/account/models')
| -rw-r--r-- | addons/account/models/account_account.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/account/models/account_account.py b/addons/account/models/account_account.py index d9b5fa936b1..da1cc0cf0c1 100644 --- a/addons/account/models/account_account.py +++ b/addons/account/models/account_account.py @@ -45,7 +45,7 @@ class AccountAccount(models.Model): raise ValidationError(_('You cannot have a receivable/payable account that is not reconcilable. (account code: %s)', account.code)) @api.constrains('user_type_id') - def _check_user_type_id(self): + def _check_user_type_id_unique_current_year_earning(self): data_unaffected_earnings = self.env.ref('account.data_unaffected_earnings') result = self.read_group([('user_type_id', '=', data_unaffected_earnings.id)], ['company_id'], ['company_id']) for res in result: @@ -169,7 +169,7 @@ class AccountAccount(models.Model): raise UserError(_("You can't change the company of your account since there are some journal items linked to it.")) @api.constrains('user_type_id') - def _check_user_type_id(self): + def _check_user_type_id_sales_purchase_journal(self): if not self: return |
