Skip to Content
Catalog / HR · Human Resources / HR Attendance GPS Geofence
HR Attendance GPS Geofence
hr_attendance_gps_geofence

HR Attendance GPS Geofence

Stop buddy-punching: GPS-verify every check-in and require a reason when off-site

v19.0.1.0.0 AlShayeb Partners Development Team Human Resources

Extends hr.attendance, hr.employee, hr.employee.public, company, settings, and project project. Geofence enforcement overrides hr.employee._attendance_action_change to validate check-ins via a Haversine _check_geofence helper (company geofence with optional per-project override); check-outs are never validated. The hr_attendance controller is subclassed to return geofence data to the frontend, expose /hr_attendance/geofence_check_in and /hr_attendance/gps_failure_with_justification endpoints, support kiosk PIN and barcode flows, and persist selfie/note/work-photo extras. hr.attendance adds approval_status (tracked, activities) plus outside_company, distance_from_company, and justification fields, and schedules a manager to-do activity on outside check-ins. A code-based ir.cron drives timezone-aware fixed-time auto check-out, rescheduled by company create/write. OWL components add a get_location_button field widget and patch the attendance systray menu.

Overview

Standard Odoo attendance trusts whatever check-in it receives, so staff can clock in from anywhere with no proof of location. This module validates each check-in against a GPS geofence around your office (or a specific project site), and when an employee is outside the allowed radius it forces them to justify it with a Contact, Project, or note before the record is saved. Managers get an automatic to-do activity for every off-site check-in plus an approve/reject workflow, and optional selfie and work-photo capture turns each attendance into auditable field evidence.

Workflow

Hr Attendance

Pending
Approved
Rejected

Key Features

  • Validates every check-in against a configurable GPS radius using the Haversine distance formula, computed server-side so it cannot be faked from the browser.
  • Lets each company or branch set its own geofence centre coordinates and radius (default 50 meters), with a one-click button that grabs the device's current location.
  • Supports per-project geofences that override the company location, so field teams are checked against their actual job site.
  • Forces employees checking in outside the radius to supply a justification (visited Contact, Project, or free-text note) before attendance is recorded.
  • Automatically posts a 'Review Required' to-do activity to the employee's attendance manager for every off-site check-in.
  • Adds an Approve / Reject / Reset approval workflow on outside-location attendances, visible only to HR Attendance Officers or the employee's attendance manager.
  • Captures an optional check-in selfie, a free-text note, and up to five work photos that are stored as attachments on the attendance record.
  • Records full audit data on each attendance: outside-company flag, exact distance from the geofence, and the justification provided.
  • Adds an Outside Location filter and Distance column to the attendance list so off-site clock-ins are easy to spot and review.
  • Provides a timezone-aware fixed-time auto check-out cron that closes forgotten open attendances each day, per company, only for opted-in employees.

Technical Details

Technical Name hr_attendance_gps_geofence
Version 19.0.1.0.0
License LGPL-3
Domain HR · Human Resources

Security

The module ships no access rules of its own; it reuses Odoo's standard HR Attendance security. Approving, rejecting, or resetting an off-site attendance is gated to members of the HR Attendance Officer group or the specific employee's assigned attendance manager, so ordinary employees can record but not self-approve out-of-area check-ins.

HR Attendance Officer (hr_attendance.group_hr_attendance_officer) - can approve/reject/reset outside-location attendances Employee's assigned Attendance Manager - can approve/reject/reset that employee's outside-location attendances and receives the review activity

Dependencies

hr_attendance hr_holidays_attendance project auth_totp