Commit ca9333d4 by Damien Moulard

Merge branch 'evolution_bdm' of…

Merge branch 'evolution_bdm' of gl.cooperatic.fr:cooperatic-foodcoops/third-party into evolution_bdm
parents c5bc3ad8 0a59be37
Pipeline #1289 failed with stage
in 1 minute 23 seconds
...@@ -1090,7 +1090,11 @@ class CagetteServices(models.Model): ...@@ -1090,7 +1090,11 @@ class CagetteServices(models.Model):
f = {'state': 'done'} f = {'state': 'done'}
late_mode = getattr(settings, 'ENTRANCE_WITH_LATE_MODE', False) late_mode = getattr(settings, 'ENTRANCE_WITH_LATE_MODE', False)
if late_mode is True: if late_mode is True:
services = CagetteServices.get_services_at_time('14:28',0, with_members=False) # services = CagetteServices.get_services_at_time('14:28',0, with_members=False)
local_tz = timezone('Europe/Paris')
now = datetime.datetime.now().astimezone(local_tz).strftime("%H:%MZ")
# coop_logger.info("Maintenant = %s", now)
services = CagetteServices.get_services_at_time(now,0, with_members=False)
if len(services) > 0: if len(services) > 0:
# Notice : Despite is_late is defined as boolean in Odoo, 0 or 1 is needed for api call # Notice : Despite is_late is defined as boolean in Odoo, 0 or 1 is needed for api call
is_late = 0 is_late = 0
......
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