From 3dd5ffcaaf2184688deaba48232c5f33a1ecccec Mon Sep 17 00:00:00 2001 From: Cybrosys Technologies Date: Sat, 21 Sep 2024 17:11:51 +0530 Subject: [PATCH] Sep 21: [FIX] Bug Fixed 'odoo_attendance_user_location' --- odoo_attendance_user_location/__manifest__.py | 2 +- odoo_attendance_user_location/doc/RELEASE_NOTES.md | 8 +++++++- odoo_attendance_user_location/models/hr_employee.py | 8 +++++--- 3 files changed, 13 insertions(+), 5 deletions(-) diff --git a/odoo_attendance_user_location/__manifest__.py b/odoo_attendance_user_location/__manifest__.py index 3291c35b8..0c74ed1c6 100644 --- a/odoo_attendance_user_location/__manifest__.py +++ b/odoo_attendance_user_location/__manifest__.py @@ -21,7 +21,7 @@ ################################################################################ { 'name': 'Geolocation in HR Attendance', - 'version': '16.0.1.0.0', + 'version': '16.0.1.0.1', 'summary': "The attendance location of the employee", 'description': "This module helps to identify the checkin/out location of the employee", 'author': 'Cybrosys Techno Solutions', diff --git a/odoo_attendance_user_location/doc/RELEASE_NOTES.md b/odoo_attendance_user_location/doc/RELEASE_NOTES.md index 7d86c8082..9fa6dce8e 100644 --- a/odoo_attendance_user_location/doc/RELEASE_NOTES.md +++ b/odoo_attendance_user_location/doc/RELEASE_NOTES.md @@ -4,4 +4,10 @@ #### Version 16.0.1.0.0 #### ADD -- Initial commit for Geolocation in HR Attendance \ No newline at end of file +- Initial commit for Geolocation in HR Attendance + +#### 21.09.2024 +#### Version 16.0.1.0.1 +#### UPDT + +- Updated Geolocation location link in HR Attendance \ No newline at end of file diff --git a/odoo_attendance_user_location/models/hr_employee.py b/odoo_attendance_user_location/models/hr_employee.py index 57a9e71a1..1339da829 100644 --- a/odoo_attendance_user_location/models/hr_employee.py +++ b/odoo_attendance_user_location/models/hr_employee.py @@ -68,6 +68,7 @@ class HrEmployee(models.AbstractModel): action_message['hours_today'] = employee.hours_today action_message['kiosk_delay'] = \ employee.company_id.attendance_kiosk_delay * 1000 + if employee.user_id: modified_attendance = employee.with_user(employee.user_id).sudo()._attendance_action_change(longitudes, latitudes) @@ -102,7 +103,8 @@ class HrEmployee(models.AbstractModel): 'checkin_address': location.address, 'checkin_latitude': latitudes, 'checkin_longitude': longitudes, - 'checkin_location': 'https://www.google.com/maps/place/' + location.address, + 'checkin_location': "https://www.google.com/maps/search/?api=1&query=%s,%s" % ( + latitudes, longitudes), } return self.env['hr.attendance'].create(vals) attendance = self.env['hr.attendance'].search( @@ -112,8 +114,8 @@ class HrEmployee(models.AbstractModel): 'checkout_address': location.address, 'checkout_latitude': latitudes, 'checkout_longitude': longitudes, - 'checkout_location': 'https://www.google.com/maps/place/' - + location.address, + 'checkout_location': "https://www.google.com/maps/search/?api=1&query=%s,%s" % ( + latitudes, longitudes), }) attendance.check_out = action_date else: