[STYLE] black
This commit is contained in:
parent
6e80e47b04
commit
c2a147693f
@ -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"),
|
||||||
]
|
]
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -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)],
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user