Merge PR #422 into 12.0

Signed-off-by sbidoul
This commit is contained in:
OCA-git-bot
2020-01-17 10:47:25 +00:00
2 changed files with 3 additions and 1 deletions

View File

@@ -210,7 +210,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):

View File

@@ -82,6 +82,7 @@ class SaleOrder(models.Model):
)
contracts |= contract
contract._onchange_contract_template_id()
contract._onchange_contract_type()
order_lines.create_contract_line(contract)
order_lines.write({'contract_id': contract.id})
for line in line_to_update_contract: