time_hour_uom
A one-getter widget that reformats a duration from 07:30 to 7h30, and drops the trailing minutes when they are zero. It loses every option the widget it extends had.
September 18, 2026Updated September 18, 20264 min read
| Technical name | time_hour_uom |
|---|---|
| Field types | float |
| Views | form, list |
| Module | hr_timesheet, installed with Timesheets |
| Used in core | 0 uses in Odoo 19 Community or Enterprise. Unchanged in Odoo 20. |
| Versions | Odoo 19.0, Odoo 20.0 |
| No-code setup | No. There is no Studio entry for this widget. |
| Alternatives | float_time, timesheet_uom, float_factor |
What the time_hour_uom widget does
What this means for your team
Working examples
Extending a component is not extending a widget
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 19.0 | Verified | Verified against the shipped 19.0 source. |
| Odoo 20.0 | Verified | Verified against the 20.0 branch. No changes. |
Unchanged between the two branches we checked.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| float_time options such as show_seconds do nothing | The descriptor does not spread floatTimeField, so none of its options are inherited. Use float_time directly, or write a small widget that extends this component and spreads the float_time descriptor. |
| The value shows as 8h when it should show 8h00 | Deliberate. When minutes parse to zero the widget uses the hours-only format. Use float_time if you need a constant HH:MM shape. |
| Leading zeros disappeared | The widget reparses with parseInt, which drops them. Expected behavior for this widget. |
| No warning when applied to a non-float field | The descriptor declares no supportedTypes, so Odoo's type-mismatch warning never fires. Check the field type yourself; this widget will not tell you. |
Time_hour_uom widget vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
time_hour_uom | Durations that must not read like clock times | Reformats to 7h30 but inherits none of float_time's options |
| float_time | Durations in HH:MM with full option support | Keeps leading zeros and supports show_seconds, unit and more |
| timesheet_uom | Durations shown in the company's configured timesheet unit | Switches between hours and days based on configuration |
| float_factor | A duration rescaled to another unit | Scales the number rather than restyling the format |
Frequently asked questions
How do I show Odoo durations as 7h30 instead of 07:30?+
Why do float_time options not work on time_hour_uom?+
Does time_hour_uom validate the field type?+
Timesheets your team argues with?
Duration formats, rounding rules and the difference between hours and days cause more timesheet disputes than the hours themselves. We configure Timesheets so what people enter, what managers approve and what gets invoiced all agree.
Book a free consultation