Merge pull request #1607 from expsa/samir-aladawi-handle-closing-app

[FIX] odex_mobile: reset last_active_time
This commit is contained in:
SamirLADOUI-sa 2024-10-23 09:11:22 +01:00 committed by GitHub
commit 8fb70fbaca
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
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()