timesheet_uom
timesheet_uom is a dispatcher: it renders every timesheet duration with whichever widget matches your company's timesheet encoding unit, hh:mm for hours, a toggle for days.
| Technical name | timesheet_uom |
|---|---|
| Field types | float |
| Views | form, list (timesheet views) |
| Module | hr_timesheet (Timesheets app) |
| Used in core | 114 occurrences across timesheet-related modules, including hr_timesheet, sale_timesheet, timesheet_grid, project |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0 |
| No-code setup | The widget is preset on timesheet views; the rendering follows Settings > Timesheets > Encoding Unit |
| Alternatives | float_time, float_toggle, float |
What the timesheet_uom widget does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
(none) | n/a | The descriptor declares no supportedOptions; it is a pure dispatcher. Rendering is controlled by Settings > Timesheets > Encoding Unit, and the delegated widget's own behavior applies. |
The one control that matters is not an option but a setting: Settings, Timesheets, Encoding Unit (per company). Hours renders hh:mm through float_time, Days renders the 0 / 0.5 / 1 toggle. Because the dispatcher passes standard field props through, the delegated widget's own quirks apply, including float_time's seconds-option key mismatch documented on its page.
Working examples
One service, three widgets
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. Dispatcher unchanged in the development branch; the underlying float_time changes. See below. |
| Odoo 19.0 | Verified | Verified against the shipped source and tested on a clean database. |
| Odoo 18.0 | Verified | Same behavior. No XML changes needed. |
| Odoo 17.0 | Verified | Same behavior. No XML changes needed. |
| Odoo 16.0 | Verified | Same behavior. No XML changes needed. |
Upgrade note. The dispatcher pattern is stable across Odoo 16 to 19, but its file moved within hr_timesheet over the versions, so JavaScript patches importing it by path need re-checking. XML usage is untouched, and the company setting migrates as data.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| Timesheets show decimals where hh:mm is expected | The company's encoding unit is not Hours, or the field lost the widget in a customized view. Check Settings > Timesheets > Encoding Unit, then confirm widget="timesheet_uom" survived the view customization. |
| Two users see different duration controls on the same view | Multi-company: each user's active company has a different encoding unit. Expected behavior; align the companies' encoding units if consistency is wanted. |
| Day toggle only offers 0, 0.5 and 1 | That is the day-encoding toggle's designed value cycle. Users can type other values directly; or switch encoding to Hours for free-form entry. |
| Changing the encoding unit did not change old records | It never does: storage stays hours; only the entry and display presentation changes. Nothing to fix; totals and billing remain consistent. |
| Custom timesheet view renders plain floats | The custom view used widget="float" or omitted the widget on unit_amount. Restore widget="timesheet_uom" instead of hand-picking a widget. |
Timesheet_uom widget vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
timesheet_uom | Timesheet durations that must follow company policy | Dispatches to float_time, a day toggle, or a factor widget based on the company encoding unit |
| float_time | Durations that must always render hh:mm | Fixed formatting, ignores the company encoding setting |
float_toggle | Click-through preset values like half days | The widget the dispatcher picks for day encoding; usable directly too |
float | Plain decimal quantities | No duration semantics at all |
Frequently asked questions
Why does my Odoo timesheet show 0.5 instead of hours and minutes?+
How do I make timesheets entry day-based in Odoo?+
Does changing the encoding unit convert my stored timesheet data?+
Can I use timesheet_uom on my own custom field?+
Does the timesheet_uom widget have options?+
Why do the two companies in my database enter time differently?+
Billing in days but tracking in chaos?
Timesheet encoding, approval flows and sale-order billing have to agree with each other before invoices go out. We configure and extend Odoo Timesheets end to end, from encoding policy to invoiced hours, on Odoo 16 through 19.
Book a free consultation