[IMP] pre-commit: first run on whole repo

This commit is contained in:
Kevin Khao
2021-11-26 18:54:38 +03:00
parent a04b8980e1
commit 167aefee13
289 changed files with 6020 additions and 4170 deletions

View File

@@ -6,10 +6,10 @@ from odoo import models
class AccountAnalyticAccount(models.Model):
_inherit = 'account.analytic.account'
_inherit = "account.analytic.account"
def name_get(self):
if self._context.get('analytic_account_show_code_only'):
if self._context.get("analytic_account_show_code_only"):
res = []
for record in self:
res.append((record.id, record.code or record.name))
@@ -17,8 +17,11 @@ class AccountAnalyticAccount(models.Model):
else:
return super().name_get()
_sql_constraints = [(
'code_company_unique',
'unique(code, company_id)',
'An analytic account with the same code already '
'exists in the same company!')]
_sql_constraints = [
(
"code_company_unique",
"unique(code, company_id)",
"An analytic account with the same code already "
"exists in the same company!",
)
]