| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Employees (hr)
• Project (project) • Discuss (mail) |
| Lines of code | 198 |
| Technical Name |
hr_work_time_time_control_mixin |
| License | OPL-1 |
| Website | https://www.2bit.ch/ |
| Versions | 18.0 |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Odoo Apps Dependencies |
•
Employees (hr)
• Project (project) • Discuss (mail) |
| Lines of code | 198 |
| Technical Name |
hr_work_time_time_control_mixin |
| License | OPL-1 |
| Website | https://www.2bit.ch/ |
| Versions | 18.0 |
Time Control Mixin
A reusable mixin that adds Start Time, End Time, and timer control to Odoo models.
Developed by 2BIT Digital GmbH — your Swiss Odoo partner for payroll, accounting, eCommerce, manufacturing and custom business solutions.
Overview
This module provides a technical AbstractModel mixin that can be inherited by any Odoo model to add precise work time recording with Start Time, End Time, and Start/Stop timer buttons.
It also extends the standard timesheet list to show Start Time and End Time columns instead of just a date, allowing for more precise time tracking directly on analytic lines.
Business Impact
Why You Need This Module
Standard Odoo timesheets record only a date and a duration. For companies that need to know exactly when work started and ended â for payroll, billing, or compliance â a date alone is not sufficient.
Which Problems It Solves
- No start and end timestamps on standard Odoo timesheets
- No reusable timer control for custom models that need work time recording
- Developers must reinvent timer logic for each custom module
Key Benefits
- Timesheet list shows precise Start Time and End Time columns
- Reusable mixin for developers to add timer controls to any model
- Start/Stop buttons with automatic duration calculation
- Running timer detection prevents accidental parallel tracking
How It Works
- After installation, the timesheet list shows Start Time and End Time instead of just a date.
- Duration is calculated automatically from the difference between start and end time.
- For developers: Inherit
hr.work.time.time.control.mixinin any model to get Start/Stop timer buttons. Implement_relation_with_timesheet_line()to link the model to analytic lines. - Starting a new timer automatically stops any currently running timer.
Screenshots
The following screenshots show one possible use of this mixin â the standard Odoo timesheet list before and after installation. Other modules may use this mixin to add timer controls to their own forms.
Standard Timesheet List â Without Mixin
The standard Odoo timesheet list shows only a Date column without precise start and end times.
Timesheet List â With Mixin Installed
After installation, the timesheet list shows Start Time and End Time columns with precise timestamps, and the duration is calculated automatically from the difference.
Installation
- Mount this module as an Odoo custom addon.
- Update the apps list in Odoo.
- Install the module from the Apps menu.
Dependencies
- Odoo modules:
hr_timesheet - Python dependencies: none
Need Swiss Odoo Experts?
Whether it's payroll, accounting, or custom development — 2BIT Digital GmbH helps Swiss companies get the most out of Odoo.
Have questions or need customization? Just reach out — we’re happy to help.
Contact 2BIT Digital GmbHOdoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module