[FIX] odex_mobile: reset last_active_time

This commit is contained in:
Samir Ladoui 2024-10-23 09:07:13 +01:00
parent 2fb1a51b08
commit 8374ee1733
1 changed files with 3 additions and 0 deletions

View File

@ -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()