hr_holidays_radio_image
The little row of illustrations on a Time Off type is a radio group in disguise. It builds each image path from the option's own label, and it is gone on the Odoo 20 development branch.
| Technical name | hr_holidays_radio_image |
|---|---|
| Field types | many2one, selection |
| Views | form |
| Module | hr_holidays, the Time Off app |
| Used in core | 1 occurrence, the Time Off type form in hr_holidays |
| Versions | Odoo 19.0, Odoo 18.0, Odoo 17.0 |
| No-code setup | No. Studio cannot set this widget, and it depends on assets shipped inside the module |
| Alternatives | image_radio, hr_homeworking_radio_image, radio, image |
What the time off icon picker does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
horizontal | boolean | Inherited from the radio widget and <strong>inert here</strong>. The replaced template lays the images out with fixed flex-wrap classes and never reads the orientation prop. Core's own view passes it regardless.(default: false) |
The image path is a convention, not a configuration. The template writes /hr_holidays/static/src/img/icons/ followed by the option's label, with no option to change either half. A custom choice therefore has to be named exactly like an image file that exists at that path, and the label is what users would otherwise read, so the two requirements are permanently coupled.
Working examples
Why the icons are named like files
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. The widget, its template and the whole Time Off type form are absent from the development branch. |
| Odoo 19.0 | Verified | Verified against the shipped source. Same template and behavior as Odoo 18. |
| Odoo 18.0 | Verified | Identical behavior; only the class syntax differs from Odoo 17. |
| Odoo 17.0 | Verified | First version. Same template, same icon folder convention. |
| Odoo 16.0 | Not available | Widget does not exist. |
Upgrade note. The widget behaves identically from Odoo 17 through Odoo 19, so no view work is needed within that range. It does not exist in Odoo 16. The one thing to check on any upgrade is custom icon attachments: they are ordinary data records, so a module that seeds them keeps working, but attachments created by hand in a database can be missed by a migration and leave the picker showing fewer choices than before.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| Broken image placeholders instead of icons | An option's label does not match a file in the module's icons folder, because the widget builds the URL from the label. Name the attachment exactly like the image file, including the extension and capitalization. |
| The picker shows no choices | The field's domain matches no attachment records, usually because the seed data was not loaded. Update the hr_holidays module so the icon attachment records are recreated. |
| The form errors when opening an existing record | The stored value is not among the fetched choices, and the read-only branch reads from the result of that lookup without guarding it. Restore or recreate the missing attachment, or clear the field on the affected records. |
| The horizontal option changes nothing | Expected. The replaced template ignores the orientation prop entirely. Adjust layout with the class attribute on the field instead. |
| Custom icons do not appear for portal or public users | The attachment record is not marked public, so the image URL is not served. Set public to True on the attachment, as core does for its eight icons. |
| Missing widget error after upgrading | The database is on a version where the widget does not exist, Odoo 16 or the Odoo 20 development branch. Remove the widget attribute, or move the choice to a widget that still exists in that version. |
Time off icon picker vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
hr_holidays_radio_image | Picking a Time Off cover image from the icons the module ships | Radio group whose image URLs are built from each option's label, inside a fixed module folder |
image_radio | A visual choice that is not tied to the Time Off module | General-purpose image radio without a hardcoded asset folder |
hr_homeworking_radio_image | Picking a work location in the HR app | Same idea with font icons instead of images, and a hardcoded whitelist of three values |
| radio | Plain labelled choices | Text labels, and its horizontal option actually works |
| image | Uploading an arbitrary picture | Free upload rather than choosing from a fixed set |
Frequently asked questions
Where do the Time Off icons come from?+
How do I add a custom Time Off icon?+
Why does the horizontal option do nothing?+
Can I use it on a selection field?+
Does the widget still exist in Odoo 20?+
Planning an HR upgrade past Odoo 19?
The Time Off data model is being reshaped in the next release, and cover icons are the visible tip of it. We map that kind of change against your customizations before it becomes an upgrade weekend, as part of Odoo migration work from 16 and 17 onward.
Book a free consultation