[MIG] partner_statement: Migration to 14.0

This commit is contained in:
Rujia Liu
2021-03-30 12:00:34 +13:00
committed by Miquel Raïch
parent 7e6d3b4360
commit f3e1ac3b18
14 changed files with 274 additions and 284 deletions

View File

@@ -11,16 +11,10 @@ class StatementCommon(models.AbstractModel):
_name = "statement.common.wizard"
_description = "Statement Reports Common Wizard"
def _get_company(self):
return (
self.env["res.company"].browse(self.env.context.get("force_company"))
or self.env.company
)
name = fields.Char()
company_id = fields.Many2one(
comodel_name="res.company",
default=_get_company,
default=lambda self: self.env.company,
string="Company",
required=True,
)