| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Project (project)
• Discuss (mail) • Employees (hr) |
| Lines of code | 528 |
| Technical Name |
systray_timesheet_timer |
| License | LGPL-3 |
| Website | https://armandi.es |
# Systray Timesheet Timer
Adds a stopwatch icon to the Odoo systray (top right, next to notifications/chat). Clicking it opens a small panel where the user can:
- Pick a project.
- Pick an existing task or create a new task in the selected project.
- Press Start to begin tracking time.
- Pause / Resume at will.
- Stop to finalize — a line is created in the timesheet (account.analytic.line) for that task.
## Persistence
The timer state is stored server-side, per user (model systray.timer, unique per user_id). This means:
- Reloading the page keeps the timer running.
- Closing the browser (or even logging out and back in) keeps the timer running.
- The timer only pauses or stops on explicit user action.
The running clock is computed from running_since + accumulated paused seconds, so wall-clock time is the source of truth, not the open browser tab.
## Timesheet line
On stop, a single account.analytic.line is created with:
- project_id / task_id of the selected task
- employee_id = the current user's `employee_id` (required — the action fails if the user is not linked to an hr.employee)
- user_id = current user
- unit_amount = total tracked seconds / 3600, rounded to 4 decimals
- name = the description typed in the panel (or a default placeholder)
- date = today, in the user's timezone
## Security
Each user can only see and modify their own systray.timer record. A record rule restricts the model to [('user_id', '=', user.id)] for base.group_user.
## Requirements
- Odoo 19.0
- Module dependencies: web, project, hr_timesheet
## Install
Drop systray_timesheet_timer/ into your Odoo addons path, update the apps list and install the module.
## License
LGPL-3
Please log in to comment on this module