From cd68e8bb5bfa287ff7e665c9a2af289c936e8d8d Mon Sep 17 00:00:00 2001 From: snt Date: Mon, 30 Mar 2026 19:18:41 +0200 Subject: [PATCH] [FIX] website_sale_aplicoop: revert >= to > condition in _confirm_linked_sale_orders The cutoff day itself is still open for orders; confirmation should only happen when the cutoff date is strictly in the past (>= today = skip). The real bug was only the order of operations in _cron_update_dates. --- website_sale_aplicoop/models/group_order.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/website_sale_aplicoop/models/group_order.py b/website_sale_aplicoop/models/group_order.py index bb9b02a..8bfe7dd 100644 --- a/website_sale_aplicoop/models/group_order.py +++ b/website_sale_aplicoop/models/group_order.py @@ -667,9 +667,9 @@ class GroupOrder(models.Model): """ self.ensure_one() - # Only confirm if cutoff date has reached or passed (>= cutoff day itself) + # Only confirm if cutoff date has strictly passed (cutoff day itself is still open) today = fields.Date.today() - if self.cutoff_date and self.cutoff_date > today: + if self.cutoff_date and self.cutoff_date >= today: _logger.info( "Cron: Skipping group order %s (%s) - cutoff date %s not yet passed", self.id,