Skip to main content
iVentureTeam

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.

August 11, 2026Updated August 11, 20266 min read
Odoo 19 attendance list showing worked hours rendered by the float_time widget as hh:mm values.
Studio nameTime
Technical namefloat_time
Field typesfloat
Viewsform, list, kanban
Moduleweb, present in every Odoo database
Used in core146 occurrences across 20 modules, including hr_attendance, mrp, hr_holidays_attendance, resource, im_livechat, project
VersionsOdoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0
No-code setupYes, via Odoo Studio (Enterprise)
Alternativesfloat, timesheet_uom, float_toggle, integer

What the Time widget does

Databases like decimal hours; humans like clock time. This widget is the translation layer: the field stores a plain float of hours, and the widget formats it as hh:mm on the way out and parses hh:mm back into a float on the way in. 8.5 becomes 08:30, 26.25 becomes 26:15, and a negative adjustment renders with its minus sign.

Because the stored value never changes shape, everything numeric keeps working: list-view sums, grouped totals, pivot aggregations and reports all operate on the float. This is the widget's real advantage over storing text like "8:30", which can be displayed but never summed.

Typing is forgiving, verified in the parser: users can enter 8:30 or 8.5 and both store the same value.

What this means for your team

Anywhere people track effort, hours read better as time. A timesheet line saying 07:45 is instantly checkable against a workday; 7.75 makes people reach for a calculator. Attendance overtime of 02:30 is unambiguous; 2.5 gets misread as two and a half days by someone skimming.

The subtle win is trust in totals. Because the widget only formats, weekly attendance sums and project hour rollups stay exact floats underneath, and payroll exports get numbers, not parsed text. Teams that store durations as text learn this the expensive way at the first payroll integration.

Our rule on implementations: any float that means hours gets this widget in every view where humans read it, and stays a bare float in exports where systems read it.

Setting it up in Odoo Studio (no code)

Studio applies this widget without code.

  1. Open the form or list in Studio and select the float field that holds hours.

  2. In Properties, set Widget to Time.

What Studio cannot do here

Two limits worth knowing.

Seconds display is nominally a Studio-visible option, but in Odoo 19 the option key Studio writes does not reach the component (see the option table below); enabling seconds reliably means setting the camelCase key in XML.

Duration semantics beyond hours, showing a float of days, or minutes, as time, are not this widget's job in Odoo 19; that arrives with the unit option in Odoo 20.

Supported options in Odoo 19

Verified against float_time_field.js in the Odoo 19.0 web module, including a genuine discrepancy between what the file declares and what it reads, which you will not find in any documentation.

OptionTypeWhat it does
displaySecondsbooleanShows 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.
typestringThe 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

Hours as time in a list

<field name="worked_hours" widget="float_time"/>

The stored 8.5 renders as 08:30; the column sum stays a correct float total.

Seconds included (the key that works in 19)

<field name="average_duration"
       widget="float_time"
       options="{'displaySeconds': True}"/>

Renders hh:mm:ss. Note the camelCase key; the snake_case display_seconds is declared in the source but never read in Odoo 19.

The model side

worked_hours = fields.Float(string="Worked Hours")

# stored: 8.5   displayed: 08:30
# stored: 26.25 displayed: 26:15 (hours pass 24 without wrapping)

No special field type needed; it is a plain float, which is exactly why aggregation keeps working.

Duration math, not clock time

Three parsing and formatting details from the source explain most surprises.

Hours do not wrap at 24. This is duration formatting, not time-of-day: 26.25 renders as 26:15, which is what a weekly total wants. If you need calendar times, you want a datetime field, not this widget.

Minutes are base 60 on both directions. Typing 8:30 stores 8.5, and typing 8.3 stores 8.3, which displays as 08:18. Users who type decimals expecting minutes create the classic "my 8.30 became 8:18" confusion; one line in training prevents it.

The float's precision still rules. A stored 8.333333 displays as 08:20, and re-saving through the widget normalizes the stored value to the displayed minutes. Mixed sources (imports, computed fields) can therefore shift by a minute on the first round-trip.

Version compatibility

VersionStatusNotes
Odoo 20.0Partial / changedNot released. Renames the seconds option to show_seconds and adds numeric, unit and a typing preview; see below.
Odoo 19.0VerifiedVerified against the shipped source, including the option-key mismatch, and tested on a clean database.
Odoo 18.0VerifiedSame behavior. No XML changes needed.
Odoo 17.0VerifiedSame behavior. No XML changes needed.
Odoo 16.0VerifiedSame 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

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. The changes below are read from the public development branch and are not final until release. For this widget they are substantial.

The seconds option is renamed and fixed. show_seconds replaces the declared-but-unread display_seconds, and the component reads exactly that key. The Odoo 19 workaround key displaySeconds stops working.

Two new options appear. numeric switches the display to plain numeric formatting, and unit declares what the float means, hours, minutes or seconds, with hours the default, so a float of minutes can finally render honestly as time.

Typing gets a live preview. The field opens a small popover that shows the parsed duration as you type, so entering 1.5 immediately shows 01:30 before you leave the field. This should retire the decimals-versus-minutes confusion described above.

If timesheets or attendance customizations matter to you, this is a widget to re-test early in an Odoo 20 migration.

Common problems and fixes

SymptomCause and fix
display_seconds is set but seconds never showVerified 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:18Decimals 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 hoursDurations 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 editingThe 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 reportQWeb reports do not run view widgets. Format in the template, e.g. with the float_time formatting helper.

Time widget vs the alternatives

WidgetBest forKey difference
float_timeFloats that mean hours: worked time, run time, totalsFormats as hh:mm both ways while storage stays a plain, summable float
floatRates and quantities that are not durationsPlain decimal display with digits control
timesheet_uomTimesheet lines that must follow the company encoding settingDispatches to float_time or a toggle depending on company UoM
float_toggleClicking through preset values like 0 / 0.5 / 1 dayA button that cycles a factor list rather than free time entry
integerWhole-number countsNo decimals, no time semantics

The practical test: if the float means a duration humans read, use float_time. If it is a rate or quantity, plain float. If it is a moment on the clock rather than an amount of time, the field should be a datetime, and no widget can fix a wrong field type.

Frequently asked questions

How do I display a float as hours and minutes in Odoo?+
Set widget="float_time" on the float field, or pick the Time widget in Studio. The stored value stays a float of hours; 8.5 displays as 08:30.
How do I show seconds with float_time in Odoo 19?+
Use options="{'displaySeconds': True}". The documented name display_seconds is declared in the source but never read in Odoo 19, a mismatch we verified directly; Odoo 20 renames the option to show_seconds.
Why did typing 8.30 give me 08:18?+
Because 8.30 is a decimal: 0.30 of an hour is 18 minutes. Type 8:30 with a colon for eight hours thirty, or 8.5. Odoo 20 adds a live preview popover that shows the parsed duration as you type, which ends this confusion.
Does float_time work for values over 24 hours?+
Yes. It formats durations, not clock time, so 26.25 renders as 26:15. That is exactly what weekly totals need. For calendar moments use a datetime field instead.
Can I sum float_time columns in list views and pivots?+
Yes, and that is the point: storage is a plain float, so sums, grouped totals and pivots aggregate correctly, and the widget formats the result as time.
What changes for float_time in Odoo 20?+
Three things visible in the development branch: the seconds option becomes show_seconds (and the old key stops working), new numeric and unit options arrive (hours, minutes or seconds), and typing shows a live parsed-duration preview. Not final until release.

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

How this page was produced

The option table, the parser behavior and the declared-versus-read option-key mismatch were all read from the Odoo 19.0 web module source (float_time_field.js) and confirmed on a clean Odoo 19 database, where the screenshot was captured. The Odoo 20 section is read from the public development branch, where the rename to show_seconds and the new numeric and unit options are visible, and is marked as unreleased. Spotted an error? Tell us and we will correct the page.