[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) <jpp@odoo.com>
This commit is contained in:
Jorge Pinna Puissant
2020-10-20 09:14:03 +00:00
parent b5b50848a1
commit 9f855ccb20
+2 -2
View File
@@ -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