[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

@@ -2,27 +2,30 @@
# @author Alexis de Lattre <alexis.delattre@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from odoo import models, fields
from odoo import fields, models
class ResCompany(models.Model):
_inherit = "res.company"
capital_amount = fields.Monetary(string='Capital Amount')
capital_amount = fields.Monetary(string="Capital Amount")
# in v9, title is only for contacts, not for companies
legal_type = fields.Char(
string="Legal Type", help="Type of Company, e.g. SARL, SAS, ...")
string="Legal Type", help="Type of Company, e.g. SARL, SAS, ..."
)
def _report_company_legal_name(self):
self.ensure_one()
if self.legal_type:
name = '%s %s' % (self.name, self.legal_type)
name = "%s %s" % (self.name, self.legal_type)
else:
name = self.name
return name
_sql_constraints = [(
'capital_amount_positive',
'CHECK (capital_amount >= 0)',
"The value of the field 'Capital Amount' must be positive."
)]
_sql_constraints = [
(
"capital_amount_positive",
"CHECK (capital_amount >= 0)",
"The value of the field 'Capital Amount' must be positive.",
)
]