[STYLE] black

This commit is contained in:
Stepan Savelyev 2019-12-28 10:56:43 +05:00
parent 6e80e47b04
commit c2a147693f
2 changed files with 11 additions and 11 deletions

View File

@ -118,9 +118,9 @@ class PrintTemplate(models.Model):
) )
company_type = fields.Selection( company_type = fields.Selection(
selection=[ selection=[
('person', 'Individual'), ("person", "Individual"),
('sp', 'Sole Proprietor'), ("sp", "Sole Proprietor"),
('plc', 'Private Limited Company'), ("plc", "Private Limited Company"),
] ]
) )

View File

@ -27,12 +27,10 @@ class ContractWizard(models.TransientModel):
company_id = fields.Many2one("res.partner", string="Company") company_id = fields.Many2one("res.partner", string="Company")
partner_id = fields.Many2one("res.partner", string="Partner") partner_id = fields.Many2one("res.partner", string="Partner")
print_template_contract = fields.Many2one( print_template_contract = fields.Many2one(
"res.partner.template.print.contract", "res.partner.template.print.contract", string="Print Template of Contract",
string="Print Template of Contract",
) )
print_template_annex = fields.Many2one( print_template_annex = fields.Many2one(
"res.partner.template.print.annex", "res.partner.template.print.annex", string="Print Template of Contract Annex",
string="Print Template of Contract Annex",
) )
transient_field_ids = fields.One2many( transient_field_ids = fields.One2many(
@ -103,11 +101,13 @@ class ContractWizard(models.TransientModel):
] ]
# Set up template domain # Set up template domain
company_type = self.partner_id.company_form if self.partner_id.is_company else 'person' company_type = (
self.partner_id.company_form if self.partner_id.is_company else "person"
)
return { return {
'domain': { "domain": {
'print_template_contract': [('company_type', '=', company_type)], "print_template_contract": [("company_type", "=", company_type)],
'print_template_annex': [('company_type', '=', company_type)] "print_template_annex": [("company_type", "=", company_type)],
} }
} }