Commit 0a59be37 by François

Use now data instead of '14:28' in registration_done method (members)

parent a48e0efe
Pipeline #1288 failed with stage
in 1 minute 20 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