float_time_selection
Time off "custom hours" in Odoo use float_time_selection: a float field dressed as a clock time, with an hour and minute dropdown popover and locale-aware display.
| Technical name | float_time_selection |
|---|---|
| Field types | float |
| Views | form (time off request forms) |
| Module | hr_holidays (Time Off) |
| Used in core | 6 occurrences, all in hr_holidays on the time off request and allocation forms |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0 |
| No-code setup | No. Set in view XML; in Studio a Decimal field offers the plain Time widget instead |
| Alternatives | float_time, datetime, timesheet_uom |
What the Time Selection field does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
displaySeconds | boolean | Inherited from float_time: shows seconds in the formatted value. Note the camelCase spelling; the declared snake_case display_seconds is never read by extractProps. |
type | string | Inherited from float_time: the underlying input's type attribute. Leave at text; the popover assumes the standard input.(default: text) |
The inherited seconds option is mislabeled in the source. The float_time descriptor declares display_seconds, but its extractProps reads options.displaySeconds. Only the camelCase spelling works, on float_time and therefore here too. Seconds rarely matter for a time-of-day picker, but if you enable them, spell it displaySeconds.
Working examples
Commit timing, parsing and rounding
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | Partial / changed | Not released. Display reworked, base preview popover disabled here, inherited option renames. See below. |
| Odoo 19.0 | Verified | Adds locale-aware readonly display. Verified against the shipped source. |
| Odoo 18.0 | Verified | First version with this widget; readonly display was the raw HH:MM format. |
| Odoo 17.0 | Not available | Widget does not exist; the component is absent from the 17.0 tree. |
| Odoo 16.0 | Not available | Widget does not exist; the component is absent from the 16.0 tree. |
Upgrade note for 18 to 19. The widget arrived in 18.0 with raw HH:MM readonly display; 19.0 added the locale-aware rendering, so the same data reads 1:30 PM instead of 13:30 for 12-hour-clock languages. Nothing changes in storage or the picker itself.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| Typed decimal like 7.75 turns into 07:45 | By design: input parses either HH:MM or decimal hours into the same float. No fix needed; both notations are accepted. |
| Value seems not to save while picking | The record is only updated when the popover closes. Click outside the popover (or otherwise close it); the chosen time commits then. |
| Displayed minutes differ slightly from stored value | The dropdowns round the float to whole minutes for display; sub-minute precision stays in storage until re-picked. Accept whole-minute precision on these fields, or avoid computing sub-minute floats into them. |
| Widget not found on Odoo 17 or earlier | It shipped with hr_holidays in 18.0. Use float_time on older versions, or backport the two components in a custom module. |
| Time shows as 13:30 for some users and 1:30 PM for others | The 19.0 readonly display follows each user's language's clock convention. By design; align user languages if a uniform format is required. |
| display_seconds option has no effect | The inherited descriptor reads the camelCase displaySeconds only. Spell the option displaySeconds. |
Time Selection field vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
float_time_selection | Time-of-day floats picked with the mouse | Adds hour and minute dropdowns and commits on popover close |
| float_time | Durations and keyboard-first HH:MM entry | Formats the float but offers no picker, and handles values beyond 23:59 |
| datetime | Actual calendar moments | Stores a timezone-aware datetime, full calendar and clock picker |
| timesheet_uom | Timesheet durations across encoding units | Dispatches to the company's configured duration widget instead of a clock |
Frequently asked questions
What is the float_time_selection widget in Odoo?+
Can users still type instead of using the dropdowns?+
When exactly is the picked time saved?+
Why does the same value display differently per user?+
Can I use float_time_selection outside Time Off?+
Is float_time_selection available in Odoo 16 or 17?+
Half-day requests turning into payroll corrections?
Clean time capture upstream saves reconciliation downstream. We configure Odoo Time Off end to end, from accrual plans to the request forms, and bring the same clock-picker UX to your custom shift and scheduling models.
Book a free consultation