Commit 27ee1d6a by François C.

Merge branch 'mail_after_missing_shift' into 'dev_cooperatic'

Modify shift_registration state condition to match 'real' use

See merge request !12
parents 3b989f16 ab03098c
...@@ -25,7 +25,7 @@ class ShiftRegistration(models.Model): ...@@ -25,7 +25,7 @@ class ShiftRegistration(models.Model):
now = datetime.datetime.now() now = datetime.datetime.now()
yesterday = now - datetime.timedelta(hours=24) yesterday = now - datetime.timedelta(hours=24)
reg_targets = shift_env.search([ reg_targets = shift_env.search([
('state', '=', 'open'), ('state', 'in', ['open', 'excused']),
('date_begin', '>=', yesterday.strftime("%Y-%m-%d %H:%M:%S")), ('date_begin', '>=', yesterday.strftime("%Y-%m-%d %H:%M:%S")),
('date_begin', '<', now.strftime("%Y-%m-%d %H:%M:%S")) ('date_begin', '<', now.strftime("%Y-%m-%d %H:%M:%S"))
]) ])
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment