From 5b22d238572c353d4f9bfd3fe944a105bb5a5204 Mon Sep 17 00:00:00 2001 From: manu Date: Tue, 28 Dec 2021 16:41:28 +0100 Subject: [PATCH] [FIX]contract: In Progress state search --- contract/models/contract_line.py | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/contract/models/contract_line.py b/contract/models/contract_line.py index e50ed6d1a..63cb7eaeb 100644 --- a/contract/models/contract_line.py +++ b/contract/models/contract_line.py @@ -199,16 +199,18 @@ class ContractLine(models.Model): "&", "&", "&", + ('display_type', '=', False), ('date_start', '<=', today), - ('is_canceled', '=', False), "|", - ('date_end', '>=', today), ('date_end', '=', False), + ('date_end', '>=', today), "|", + "|", + "|", + ('termination_notice_date', '=', False), + ('termination_notice_date', '>=', today), ('is_auto_renew', '=', True), - "&", - ('is_auto_renew', '=', False), - ('termination_notice_date', '>', today), + ('manual_renew_needed', '=', True), ] if state == 'to-renew': return [