From 0c4992dff801d86f1484384a454077d89ddba540 Mon Sep 17 00:00:00 2001 From: fkantelberg Date: Tue, 24 Jan 2023 09:54:12 +0100 Subject: [PATCH] [FIX] No contract line and invoices when contract is archived --- contract/models/contract.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/contract/models/contract.py b/contract/models/contract.py index ecaeee56b..c07561718 100644 --- a/contract/models/contract.py +++ b/contract/models/contract.py @@ -57,6 +57,7 @@ class ContractContract(models.Model): comodel_name="contract.line", inverse_name="contract_id", copy=True, + context={"active_test": False}, ) # Trick for being able to have 2 different views for the same o2m # We need this as one2many widget doesn't allow to define in the view @@ -67,6 +68,7 @@ class ContractContract(models.Model): string="Contract lines (fixed)", comodel_name="contract.line", inverse_name="contract_id", + context={"active_test": False}, ) user_id = fields.Many2one(