float_time
The float_time widget displays a float of hours as clock-style time: 8.5 renders as 08:30. Storage stays a plain float, so sums and reports keep working.
| Studio name | Time |
|---|---|
| Technical name | float_time |
| Field types | float |
| Views | form, list, kanban |
| Module | web, present in every Odoo database |
| Used in core | 146 occurrences across 20 modules, including hr_attendance, mrp, hr_holidays_attendance, resource, im_livechat, project |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0 |
| No-code setup | Yes, via Odoo Studio (Enterprise) |
| Alternatives | float, timesheet_uom, float_toggle, integer |
What the Time widget does
What this means for your team
Setting it up in Odoo Studio (no code)
What Studio cannot do here
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
displaySeconds | boolean | Shows seconds (hh:mm:ss). This camelCase key is what extractProps actually reads in Odoo 19. The declared option name display_seconds appears in panels but is never read, so use this key in XML. |
type | string | The HTML input type used while editing. The default text input is what enables the forgiving hh:mm parsing; changing it is rarely useful.(default: text) |
The seconds option's documented name does not work in Odoo 19. The descriptor declares display_seconds, which is what option panels display, but extractProps reads options.displaySeconds. Only options="{'displaySeconds': True}" actually shows seconds. Odoo 20 resolves this by renaming the option to show_seconds and reading exactly that key.
Working examples
Duration math, not clock time
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | Partial / changed | Not released. Renames the seconds option to show_seconds and adds numeric, unit and a typing preview; see below. |
| Odoo 19.0 | Verified | Verified against the shipped source, including the option-key mismatch, 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. Views carry from Odoo 16 to 19 unchanged. When you migrate to Odoo 20, replace any displaySeconds key with show_seconds; the old camelCase read disappears along with the renamed option, so seconds display silently turns off if the option is left as-is.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| display_seconds is set but seconds never show | Verified Odoo 19 quirk: the component reads displaySeconds, not the declared display_seconds. Use options="{'displaySeconds': True}" (and switch to show_seconds on Odoo 20). |
| User typed 8.30 and got 08:18 | Decimals are fractions of an hour: 0.3 h = 18 min. Expected behavior. Type 8:30 for eight and a half hours, or 8.5. One line in user training. |
| Total shows more than 24 hours | Durations do not wrap at 24 by design; 26:15 is a valid total. Nothing to fix; use a datetime field if you needed a clock time instead. |
| Stored value shifts by a minute after editing | The displayed hh:mm rounds to minutes, and saving normalizes the float to it. Expected with high-precision computed sources; keep such fields readonly in views. |
| Widget on the field does nothing in a report | QWeb reports do not run view widgets. Format in the template, e.g. with the float_time formatting helper. |
Time widget vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
float_time | Floats that mean hours: worked time, run time, totals | Formats as hh:mm both ways while storage stays a plain, summable float |
float | Rates and quantities that are not durations | Plain decimal display with digits control |
| timesheet_uom | Timesheet lines that must follow the company encoding setting | Dispatches to float_time or a toggle depending on company UoM |
float_toggle | Clicking through preset values like 0 / 0.5 / 1 day | A button that cycles a factor list rather than free time entry |
integer | Whole-number counts | No decimals, no time semantics |
Frequently asked questions
How do I display a float as hours and minutes in Odoo?+
How do I show seconds with float_time in Odoo 19?+
Why did typing 8.30 give me 08:18?+
Does float_time work for values over 24 hours?+
Can I sum float_time columns in list views and pivots?+
What changes for float_time in Odoo 20?+
Time tracking that adds up?
Attendance, timesheets and production run times live or die on clean duration handling: the right widgets on the right floats, totals that match payroll, and imports that do not drift by a minute. We build exactly that on Odoo 16 through 19.
Book a free consultation