From 8374ee17331b910a80ede3a7c11e603be7390c7e Mon Sep 17 00:00:00 2001 From: Samir Ladoui Date: Wed, 23 Oct 2024 09:07:13 +0100 Subject: [PATCH] [FIX] odex_mobile: reset last_active_time --- .../odex_mobile/controllers/rest_api_v2/attendance.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/odex25_mobile/odex_mobile/controllers/rest_api_v2/attendance.py b/odex25_mobile/odex_mobile/controllers/rest_api_v2/attendance.py index 0636d0f49..5e728f4d4 100644 --- a/odex25_mobile/odex_mobile/controllers/rest_api_v2/attendance.py +++ b/odex25_mobile/odex_mobile/controllers/rest_api_v2/attendance.py @@ -234,6 +234,9 @@ class AttendanceController(http.Controller): else: msg = (_("Check Fail Due To Duplication")) data = {} + # Reset last_active_time when the employee signed out + if body.get('action') == 'sign_out': + employee.last_active_time = False return http_helper.response(msg, data={'checks': [data]}) except (UserError, AccessError, ValidationError, Exception, Warning) as e: http.request._cr.rollback()