From da6499648cd0bd99f617e8bfc1b71f87305e4ae3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9my=20Taymans?= Date: Sat, 8 Jun 2019 17:12:40 +0200 Subject: [PATCH] [FIX] b_shift: Next Countdown compute This fixes the computation of the next countdown date. --- beesdoo_shift/__openerp__.py | 2 +- beesdoo_shift/models/cooperative_status.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/beesdoo_shift/__openerp__.py b/beesdoo_shift/__openerp__.py index 2a4af6a..ccde520 100644 --- a/beesdoo_shift/__openerp__.py +++ b/beesdoo_shift/__openerp__.py @@ -13,7 +13,7 @@ 'website': "https://github.com/beescoop/Obeesdoo", 'category': 'Cooperative management', - 'version': '9.0.1.1.0', + 'version': '9.0.1.1.1', 'depends': ['beesdoo_base'], diff --git a/beesdoo_shift/models/cooperative_status.py b/beesdoo_shift/models/cooperative_status.py index 4c73853..098ec4f 100644 --- a/beesdoo_shift/models/cooperative_status.py +++ b/beesdoo_shift/models/cooperative_status.py @@ -208,7 +208,7 @@ class CooperativeStatus(models.Model): today_dt = fields.Date.from_string(today) irregular_start_dt = fields.Date.from_string(irregular_start_date) delta = (today_dt - irregular_start_dt).days - return add_days_delta(today, delta % PERIOD) + return add_days_delta(today, PERIOD - (delta % PERIOD)) def _set_regular_status(self, grace_delay, alert_delay): self.ensure_one()