Browse Source

Sep 21: [FIX] Bug Fixed 'odoo_attendance_user_location'

pull/332/merge
Cybrosys Technologies 7 months ago
parent
commit
3dd5ffcaaf
  1. 2
      odoo_attendance_user_location/__manifest__.py
  2. 8
      odoo_attendance_user_location/doc/RELEASE_NOTES.md
  3. 8
      odoo_attendance_user_location/models/hr_employee.py

2
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',

8
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
- Initial commit for Geolocation in HR Attendance
#### 21.09.2024
#### Version 16.0.1.0.1
#### UPDT
- Updated Geolocation location link in HR Attendance

8
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:

Loading…
Cancel
Save