Skip to main content
iVentureTeam

hr_homeworking_radio_image

The building, house and map-marker radios on Odoo's work location form are hr_homeworking_radio_image, a radio widget whose template only knows three hardcoded values, ignores its own inherited option, and disappears entirely in the Odoo 20 branch.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 26, 2026Updated August 26, 20266 min read
Technical namehr_homeworking_radio_image
Field typesselection
Viewslist, form
Modulehr (template namespace hr_homeworking)
Used in core2 occurrences across 1 module: the work location list and form views in hr
VersionsOdoo 19.0, Odoo 18.0, Odoo 17.0
No-code setupNo. Applied in XML; Studio does not list it
Alternativesradio, selection_badge, boolean_radio, day_selection

What the Location radio widget does

Work locations in Odoo HR carry a location_type selection with three values: office, home and other. This widget renders that selection as a row of icon radio buttons, an outlined building, a house and a map marker, instead of the standard labeled radios.

Under the hood it is the plain radio widget with one swap: a replacement template. The component class is empty except for the template assignment, and the descriptor spreads radioField wholesale. All the logic, items, change handling, checked state, is inherited; only the markup changed.

That replacement template is where all the behavior lives. It loops the selection items but renders a radio only for values in a hardcoded list, ['office', 'home', 'other'], and picks the icon with an if/else chain: building for office, home for home, map marker for everything else that survived the whitelist. Labels are not rendered at all; the icons are the interface.

What this means for your team

The widget exists because of hybrid work. When Odoo added homeworking features, the work location record became something employees and HR touch often enough that a compact, icon-first picker beat a text dropdown; the same three icons reappear across the homeworking calendar and presence features, so the form teaches the vocabulary the rest of the app speaks.

For HR administrators the practical meaning is standardization: the three types are a fixed taxonomy, not a customizable list. Odoo's own UI commits to exactly office, home and other, and this widget is that commitment rendered literally, values outside the trio have no radio.

If your organization genuinely needs a fourth location type, treat this widget as a signal that you are leaving the paved road: the field accepts new selection values, but this picker will not show them, and downstream homeworking features assume the trio too.

Supported options in Odoo 19

One inherited option, shown for completeness, and the story here is that it does not work: the descriptor spread brings radio's option surface along, but the replaced template ignores the prop it feeds. Verified in the Odoo 19.0 source of the widget, the base radio, and the core views.

OptionTypeWhat it does
horizontalbooleanInherited from radio through the descriptor spread, and inert: the replacement template hardcodes its own flex layout and never reads the orientation prop. Core's own views pass {'horizontal': true} to no effect.(since Odoo 17.0)

Core passes a dead option. Both core usages write options="{'horizontal': true}", and the value goes precisely nowhere: the replacement template lays the radios out with its own flex classes and never reads the orientation prop. The layout would be identical without the option, a nice reminder that even core XML can carry no-ops.

Working examples

How core applies it (work location form)

<field class="o_homework_icon_types d-flex flex-wrap" name="location_type"
       widget="hr_homeworking_radio_image" options="{'horizontal': true}"/>

The same line appears in the work location list view, making the type editable inline. The horizontal option is inert, see the note above.

What a custom value does

# adding a selection value in Python...
location_type = fields.Selection(selection_add=[("client", "Client site")])

...renders nothing in this widget: client is not in the template's whitelist, so the radio row still shows three buttons and the value can only be set from elsewhere. Use the plain radio or selection widget on views where custom values must be pickable.

Hardcodes all the way down

The widget rewards a close read because everything interesting is a hardcode.

The whitelist beats the field definition. The template's t-if checks membership in ['office', 'home', 'other'] before rendering each item. The base radio machinery still loads every selection value into items, so the data is there; the markup just declines to draw it. Meanwhile the icon chain's else branch means other and only other gets the map marker, since anything else already failed the whitelist.

A module and a namespace disagree. The file lives in addons/hr but the template is hr_homeworking.RadioImageField. In Odoo 17 the widget shipped with the homeworking feature set; later reshuffles moved the file into hr while the template name stayed put. Grep by template name and you will look in the wrong module.

A sibling widget shares the pattern. hr_holidays ships its own hr_holidays_radio_image, the same base-radio-plus-template trick with a different template, proof that the pattern is a house style for icon radios rather than a one-off.

The 17-only preload. Odoo 17 also added a preloadedData registry entry so many2one radios would prefetch, copied from the base radio's own preload. Odoo 18 removed that registry; the entry vanished with it, harmless since the core usage is a selection anyway.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. Deleted on the development branch; core switches to badges_selection with an icon mapping.
Odoo 19.0VerifiedVerified against the shipped source; template and whitelist unchanged from 18.
Odoo 18.0VerifiedDrops 17's preloadedData registration; otherwise identical.
Odoo 17.0VerifiedWidget introduced with the homeworking feature set, plus a preload entry for m2o radios.
Odoo 16.0Not availableWidget does not exist; only hr_holidays had a radio_image variant of its own.

Upgrade note. Views from 17 or 18 carry into 19 unchanged. For Odoo 20, plan a view review: the widget is gone on the development branch and the XML needs rewriting toward its replacement, see below.

What is changing in Odoo 20

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026, and the development branch is not final until then.

On the branch, the widget is deleted outright, along with its hr_holidays sibling, with no alias left behind. The work location form migrates to the badges_selection widget with an icon configuration: {'default_icon': 'location_on', 'icon_mapping': {'office': 'business', 'home': 'home'}}, and the list view drops the inline type column entirely. Custom views naming hr_homeworking_radio_image will log Missing widget and fall back to the default selection rendering; migrate them to badges_selection with an equivalent mapping. We re-verify at release.

Common problems and fixes

SymptomCause and fix
A custom location type never appears as a radioThe template whitelists office, home and other; every other value is skipped during rendering. Use the plain radio or selection widget for custom vocabularies; the whitelist is not configurable.
horizontal option changes nothingThe replacement template ignores the inherited orientation prop and hardcodes its layout. Style via the class attribute on the field, as core does with d-flex flex-wrap.
No text labels next to the iconsThe template renders icons only; labels are intentionally absent. By design; add a help tooltip on the field or use the standard radio widget where labels matter.
Cannot find the template in the hr_homeworking moduleThe template namespace says hr_homeworking but the file ships in the hr module. Look under addons/hr/static/src/components/radio_image_field/.
Missing widget warning after an Odoo 20 upgradeThe widget is deleted on the development branch with no alias. Rewrite the view to badges_selection with default_icon and icon_mapping options.

Location radio widget vs the alternatives

WidgetBest forKey difference
hr_homeworking_radio_imageThe fixed office/home/other work location picker in HR viewsIcon-only radios with a hardcoded three-value whitelist and no label rendering
radioGeneral selections as labeled radio buttonsRenders every selection value with its label, and horizontal actually works
selection_badgeSelection values as clickable badgesText badges for any value set; on Odoo 20 its successor takes over this widget's job with icons
boolean_radioYes/no choices rendered as two radios in HR formsBoolean-only sibling with view-template labels instead of icons
day_selectionDay-of-month picking in HR homeworking flowsDropdown driven by a companion month field, not an icon radio row

For anything beyond the fixed office/home/other trio, drop to the general-purpose pickers below; this widget's whitelist makes it a single-purpose tool by construction.

Frequently asked questions

What is the hr_homeworking_radio_image widget in Odoo?+
It renders the work location type on hr.work.location as three icon radio buttons, a building for office, a house for home and a map marker for other, replacing the standard labeled radios. It is the base radio widget with a swapped template.
Why does my new location type not show in the picker?+
The widget's template hardcodes the values office, home and other; anything else is skipped at render time even though the field accepts it. Custom values need the plain radio or selection widget.
Does the horizontal option do anything on this widget?+
No. The option is inherited from radio, but the replacement template lays radios out with its own flex classes and never reads the prop. Core's own views pass it anyway, to no effect.
Where is the hr_homeworking_radio_image source code?+
In addons/hr/static/src/components/radio_image_field/ since Odoo 17, despite the template namespace saying hr_homeworking. A separate sibling, hr_holidays_radio_image, lives in hr_holidays.
What replaces hr_homeworking_radio_image in Odoo 20?+
The development branch deletes the widget and renders location_type with badges_selection, configured with default_icon location_on and an icon_mapping for office and home. Custom views should migrate the same way.

Rolling out hybrid work in Odoo?

We set up Odoo HR for hybrid teams: work locations, homeworking schedules, presence indicators and the approval flows around them, plus clean migrations when Odoo swaps widgets under your customizations, on 16 through 19.

Set up hybrid work right

How this page was produced

This page was verified by reading radio_image_field.js and its template in the Odoo 17.0, 18.0 and 19.0 hr module sources, the base radio_field.js in web, the sibling widget in hr_holidays, and both core usages in hr_work_location_views.xml, including the development-branch version where the widget is removed and replaced. Corrections welcome via our contact page.