Browse Source

[FIX] b_shift: Next Countdown compute

This fixes the computation of the next countdown date.
pull/90/head
Rémy Taymans 6 years ago
parent
commit
355fd61e85
  1. 2
      beesdoo_shift/__openerp__.py
  2. 2
      beesdoo_shift/models/cooperative_status.py

2
beesdoo_shift/__openerp__.py

@ -13,7 +13,7 @@
'website': "https://github.com/beescoop/Obeesdoo", 'website': "https://github.com/beescoop/Obeesdoo",
'category': 'Cooperative management', 'category': 'Cooperative management',
'version': '9.0.1.1.0',
'version': '9.0.1.1.1',
'depends': ['beesdoo_base'], 'depends': ['beesdoo_base'],

2
beesdoo_shift/models/cooperative_status.py

@ -208,7 +208,7 @@ class CooperativeStatus(models.Model):
today_dt = fields.Date.from_string(today) today_dt = fields.Date.from_string(today)
irregular_start_dt = fields.Date.from_string(irregular_start_date) irregular_start_dt = fields.Date.from_string(irregular_start_date)
delta = (today_dt - irregular_start_dt).days 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): def _set_regular_status(self, grace_delay, alert_delay):
self.ensure_one() self.ensure_one()

Loading…
Cancel
Save