From 9f855ccb2031987964d5b67e6d6c2f36d63b242a Mon Sep 17 00:00:00 2001 From: Jorge Pinna Puissant Date: Tue, 13 Oct 2020 06:53:31 +0000 Subject: [PATCH] [FIX] account: duplicate method name closes #59683 closes odoo/odoo#60343 X-original-commit: 1c0db7b2f4e5bdfba921e82e6872ac13d44f9d7a Related: odoo/enterprise#14229 Signed-off-by: Jorge Pinna Puissant (jpp) --- addons/account/models/account_account.py | 4 ++-- 1 file 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