From d18047f89dbbf110e469637d71dda9242af19ca3 Mon Sep 17 00:00:00 2001 From: Emanuel Cino Date: Thu, 31 Aug 2023 08:30:01 +0200 Subject: [PATCH] T0469 FIX bug in end date reached scheduled action --- recurring_contract/models/recurring_contract.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/recurring_contract/models/recurring_contract.py b/recurring_contract/models/recurring_contract.py index 6343125f..7c81fbaf 100644 --- a/recurring_contract/models/recurring_contract.py +++ b/recurring_contract/models/recurring_contract.py @@ -432,7 +432,7 @@ def invoice_paid(self, invoice): def end_date_reached(self): now = fields.Datetime.now() expired = self.search([ - ('end_date', '>=', now), + ('end_date', '<', now), ('state', 'not in', ['cancelled', 'terminated']) ]) return expired.action_contract_terminate()