| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Attendances (hr_attendance)
• Discuss (mail) • Employees (hr) |
| Community Apps Dependencies | Show |
| Lines of code | 1815 |
| Technical Name |
eh_hr_attendance_reports |
| License | LGPL-3 |
| Website | https://www.erpheritage.com.au/ |
| Versions | 16.0 17.0 18.0 19.0 |
Attendance Exception Detection
An hourly worker that flags late check-ins and missed check-outs, plus a live today-on-site board for managers.
Why this module
Attendance Exception Detection
Late and missed check-outs surfaced automatically
Every hour the cron flags check-ins past the company cutoff and open attendances that ran past the threshold, so HR is not reconstructing who was late from raw timesheets.
Idempotent by design
Each pass tags an attendance once. A re-run, a manual trigger, or an overlapping schedule is a no-op for already-flagged records, so the exception list stays clean.
A live today on-site board
The today attendance kanban groups people by open or closed state, so a manager opens one screen and immediately sees who is still checked in.
Day in the life
A shift that nearly slipped through
At 14:00 the cron runs its second pass for the day. One warehouse worker checked in at 09:31 against a 09:00 default and a 5 minute grace, so a warning-severity late exception is raised against that attendance. Another worker from the morning never checked out and their check-in is now 13 hours old, past the 12 hour threshold, so a critical missed-checkout exception is raised and the attendance row stays open for HR to close by hand. When the cron runs again at 15:00 it finds both already tagged and does nothing further. The supervisor opens the today attendance board, sees the still-open row at the top of the open group, walks over, and clears it before payroll cutoff.
Edge cases
The cases most modules quietly ignore.
In the shipped code today, each one a place where a cheaper module silently does the wrong thing.
Each pass collects already-tagged attendances by type before creating, so re-runs, manual triggers, or overlapping schedules never duplicate an exception for the same attendance.
Both passes iterate every company and filter on employee_id.company_id, so a worker in one company is never measured against another company's cutoff or threshold.
The late cutoff is built in the company partner timezone and converted to UTC for the search. An unknown timezone falls back to UTC instead of raising.
A missed-checkout exception flags the situation but leaves the attendance row open, so HR closes it deliberately rather than the cron guessing a check-out time.
A check-in inside the default-time-plus-grace window is treated as on time and raises nothing, verified by the on-time test alongside the late and idempotency tests.
The cron runs as the root user and creates exceptions with sudo, so detection is independent of which user account happens to be active.
What is inside
Built to do the job, end to end.
- Two-pass hourly cron. _cron_detect_exceptions runs late check-in and missed check-out detection in sequence, scheduled hourly via an ir.cron in code state running as root.
- Per-company thresholds. Default check-in time, late grace minutes, and missed-checkout hours are fields on res.company exposed through res.config.settings, with sensible defaults of 09:00, 5 minutes, and 12 hours.
- Today on-site board. A menu-wired kanban on hr.attendance groups by a computed open or closed state, with today, open, and closed filters, restricted to the manager and auditor groups from the base module.
- Open or closed state field. An eh_state computed field with a matching search method lets you filter and group attendance by whether a check-out exists, used by the dashboard and its search view.
- Tested detection logic. Five tests cover late raising, on-time silence, idempotent re-runs, missed-checkout raising at critical severity, and recent open attendances correctly raising nothing.
Honest about the edges
What this does not do, so nothing surprises you.
- Requires the eh_hr_attendance_base and hr_attendance modules. The exception model, severity levels, resolution tracking, and audit chatter come from the base module, not this one.
- Detection uses company-wide defaults only. There is no per-employee roster or planned-shift lookup in this module, so everyone in a company is measured against the same default check-in time.
- The cron creates exceptions directly and does not write a kiosk audit event for cron-raised exceptions; only exceptions raised through the base public API are audit-logged.
- Of the dashboards, only the today attendance kanban is wired to a menu. The exception kanban view ships but is not attached to its own action or menu in this release, and there is no separate audit-log dashboard here.
- The missed-checkout pass flags but does not auto-close attendance. Closing the open row is a manual HR action.
- No advisory locks or savepoints are used. Re-run safety comes from per-attendance dedupe queries rather than database-level locking.
Odoo 18 attendance reports, attendance exception detection, late check-in detection Odoo, missed checkout alert, hr_attendance dashboard, attendance reporting Odoo Community, open attendance tracking, attendance cron Odoo, today attendance kanban, multi-company attendance, attendance grace period, HR attendance exceptions
Need this fitted to the way you work?
ERP Heritage delivers end to end Odoo work: Odoo Implementation, Customization and Development, Integration, Migration, Consultation, Support and Training. We help teams put this module into production, shape it to their process, and keep it running.
We work with businesses across Australia (Melbourne, Sydney, Brisbane, Perth, Adelaide, Canberra) and the Middle East (Dubai, Abu Dhabi, Riyadh, Jeddah, Doha, Kuwait City, Muscat). Start a conversation at erpheritage.com.au or email info@erpheritage.com.au.
Languages
Available in 19 languages
The interface ships translated out of the box. Switch language in Odoo and the fields, menus, and messages follow.
Please log in to comment on this module