| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Project (project)
• Discuss (mail) • Attendances (hr_attendance) • Employees (hr) |
| Community Apps Dependencies | Show |
| Lines of code | 4431 |
| Technical Name |
eh_hr_attendance_jobcost |
| License | LGPL-3 |
| Website | https://www.erpheritage.com.au/ |
| Versions | 16.0 17.0 18.0 19.0 |
Attendance Job Costing
Put an analytic account, project, and task on every attendance row, chosen at the kiosk the moment a worker clocks in.
Why this module
Attendance Job Costing
Tag hours when they happen
The job is chosen at the kiosk the moment the worker clocks in, not pieced back together from memory at the end of the week. The selection writes straight onto the attendance row that was just created.
Workers only see their jobs
An allowed analytic list per employee limits the picker to the jobs that worker is on. Leave it empty and the kiosk offers any active analytic account in the company. The endpoint checks the worker and the attendance both belong to the device's company.
Fields, not magic posting
This module records the analytic account, project, and task on hr.attendance and logs the punch. It is the capture layer. It does not post analytic ledger entries or build timesheets on its own, so what you see claimed is what the code does.
Day in the life
A site supervisor runs two jobs out of one kiosk.
Two crews share a door kiosk at a fit out site working two client jobs at once. With require job punch on, every face match pauses on a picker showing only that worker's allowed analytic accounts. A carpenter taps the right job and the success card clears as usual; the analytic account lands on the attendance row that match just created. A labourer with only one allowed job and the toggle off skips the picker entirely. At week's end the attendance list already shows the analytic column filled in, so there is no spreadsheet to reconcile against the door log and no argument about who was on which job.
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.
Both kiosk endpoints reject any request without a valid X-EH-Kiosk-Token header, returning 401. The token resolves to an active terminal record before anything else runs.
The options endpoint refuses an employee that does not belong to the device's company, and the punch endpoint refuses an attendance whose employee sits in a different company, so a device cannot read or write across company boundaries.
When an employee has an allowed analytic list, the picker filters it to active accounts only, so an archived job silently drops off the kiosk without breaking the list.
The picker only interrupts the flow when the company requires it or the worker has more than one option. A single allowed job with the toggle off passes straight through to the normal success screen.
A model constraint blocks saving an attendance whose task does not belong to its selected project, raising a validation error rather than storing an inconsistent pair.
The punch endpoint only writes the keys that were actually sent and skips the write entirely when nothing was selected, so a skip or an empty payload leaves the row untouched.
When require job punch is off and the worker makes no selection, the kiosk can fall back to the employee's default analytic account if that default is among their allowed accounts.
What is inside
Built to do the job, end to end.
- Fields on hr.attendance. Adds eh_analytic_account_id, eh_project_id, and eh_task_id to hr.attendance, all indexed where it matters, with the task domain bound to the chosen project and a constrains check that the task belongs to that project.
- Employee defaults and allow list. Adds a default analytic account, a default project, and a many to many allowed analytic accounts list to hr.employee, so each worker carries their own job scope and starting point.
- Company and settings toggle. Adds eh_hr_require_job_punch on res.company with a matching related field in res.config.settings, exposed in the attendance settings so an administrator flips it without touching data.
- Kiosk endpoints. Two HTTP routes, a GET options endpoint that returns the worker's scoped job choices and whether the picker is required, and a POST punch endpoint that writes the selection back to the attendance row, both token authenticated and CSRF exempt for kiosk use.
- Kiosk picker and audit. A job picker injected into the face kiosk shell that interrupts after a successful match, plus a kiosk event log entry written on every job punch recording the device, employee, attendance reference, and the chosen analytic, project, and task.
- Backend views. Inherited attendance list and form views surface the analytic, project, and task columns next to the existing fields, and the employee form gains a Job costing block under the attendance page.
Honest about the edges
What this does not do, so nothing surprises you.
- This module captures cost references on hr.attendance. It does not post analytic ledger lines or generate project timesheets by itself; downstream costing relies on standard Odoo or your own posting step.
- It requires the ERP Heritage attendance base and face kiosk modules, plus the standard analytic and project apps, and is an add on to that kiosk rather than a standalone time entry tool.
- The kiosk picker offers analytic accounts as the job choice. Project and task can be stored on the row and the endpoint accepts them, but the shipped kiosk UI drives the analytic selection.
- Allowed lists and defaults are set per employee by an administrator; there is no self service screen for workers to manage their own job list.
- Built and tested for Odoo 18 Community. Other Odoo versions are not in scope for this branch.
attendance job costing odoo 18, analytic account on attendance, hr.attendance analytic, kiosk job picker odoo, project task time tracking attendance, construction time tracking odoo community, field services billable hours, per employee analytic allowed list, require job punch toggle, face kiosk job costing, project timesheet attendance odoo, multi company kiosk attendance
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.
Please log in to comment on this module