mirror of
https://github.com/OCA/contract.git
synced 2025-02-13 17:57:24 +02:00
[12.0][FIX] - Run onchange contract_type when changing the contract template
Fix this use-case: If the contract journal is not set on the contract template the contract is created without a journal when confirming the sale order
This commit is contained in:
committed by
Francisco Ivan Anton Prieto
parent
3fcae72d8a
commit
b30a41b2da
@@ -209,7 +209,8 @@ class ContractContract(models.Model):
|
||||
field.name in self.NO_SYNC,
|
||||
)
|
||||
):
|
||||
self[field_name] = self.contract_template_id[field_name]
|
||||
if self.contract_template_id[field_name]:
|
||||
self[field_name] = self.contract_template_id[field_name]
|
||||
|
||||
@api.onchange('partner_id')
|
||||
def _onchange_partner_id(self):
|
||||
|
||||
Reference in New Issue
Block a user