From 056a3b3a87e5c5fa9de712e0e3cb50c5abf95ffe Mon Sep 17 00:00:00 2001 From: eslamabady Date: Sun, 22 Sep 2024 18:04:10 +0300 Subject: [PATCH] fix --- .../odex_mobile/controllers/rest_api_v2/attendance.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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 0f43b7d07..96cffd017 100644 --- a/odex25_mobile/odex_mobile/controllers/rest_api_v2/attendance.py +++ b/odex25_mobile/odex_mobile/controllers/rest_api_v2/attendance.py @@ -438,12 +438,12 @@ class AttendanceController(http.Controller): 'employee_id': employee.id, 'action': 'sign_out', 'action_type': 'auto', - 'name': fields.datetime.now(), + 'name': last, 'zone': "%s,%s" % (body.get('longitude'), body.get('latitude')), 'longitude': body.get('longitude'), 'latitude': body.get('latitude'), }) - msg = _("Auto Checkout successfully") + msg = _("Auto Checkout successfully") subject = _("Auto Checkout") self.send_msg(employee, msg, subject) records = employee.attendance_log_ids.sudo().filtered( @@ -451,14 +451,14 @@ class AttendanceController(http.Controller): for r in records: r.old = True employee.message_sent = False - return http_helper.response(message="Auto Checkout successfully", data={'status': True}) + return http_helper.response(message="Auto Checkout successfully", data={'status': True}) else: if not employee.message_sent: msg = _("You are out of attendance zone you will be auto sign out") subject = _("Auto Sign out") self.send_msg(employee, msg, subject) employee.message_sent = True - return http_helper.response(message="Auto Checkout Fail and Send %s-%s-%s-%s"%(zone.auto_checkout,zone_general.auto_checkout,zone,zone_general), data={'status': False}) + return http_helper.response(message="Auto Checkout Fail and Send", data={'status': False}) else: self.create_log(employee, body.get('longitude'), body.get('latitude')) if not employee.message_sent: