[ADD] domain to templates
This commit is contained in:
parent
77ca108bef
commit
1ee2b26fe3
@ -104,6 +104,15 @@ class ContractWizard(models.TransientModel):
|
|||||||
for field, value in sorted(contract_context_values.items())
|
for field, value in sorted(contract_context_values.items())
|
||||||
]
|
]
|
||||||
|
|
||||||
|
# Set up template domain
|
||||||
|
company_type = self.partner_id.company_form if self.partner_id.is_company else 'person'
|
||||||
|
return {
|
||||||
|
'domain': {
|
||||||
|
'print_template_contract': [('company_type', '=', company_type)],
|
||||||
|
'print_template_annex': [('company_type', '=', company_type)]
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
@api.multi
|
@api.multi
|
||||||
def get_docx_contract(self):
|
def get_docx_contract(self):
|
||||||
template = self._get_template()
|
template = self._get_template()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user