diff --git a/agreement_legal/models/agreement.py b/agreement_legal/models/agreement.py index 21bb7c55..b506b1cd 100644 --- a/agreement_legal/models/agreement.py +++ b/agreement_legal/models/agreement.py @@ -350,7 +350,7 @@ class Agreement(models.Model): "stage_id": self.env.ref("agreement_legal.agreement_stage_new").id, } res = self.copy(default=default_vals) - res.sections_ids.write({'agreement_id': res.id}) + res.sections_ids.mapped('clauses_ids').write({'agreement_id': res.id}) return { "res_model": "agreement", "type": "ir.actions.act_window",