badges_selection
New in Odoo 20 and the replacement for selection_badge. It declares a single option and quietly reads four more, two of which do conditional choice filtering with no Python at all.
September 18, 2026Updated September 18, 20264 min read
| Technical name | badges_selection |
|---|---|
| Field types | selection |
| Views | form, list |
| Module | web, present in every Odoo 20 database |
| Used in core | 26 uses across Odoo 20 Community and Enterprise views, excluding tests. Does not exist in Odoo 19. |
| Versions | Odoo 20.0 |
| No-code setup | Partly. Studio will offer only badge_limit, because it is the sole declared option. |
| Alternatives | badges_many2one, selection_badge, statusbar, radio |
What the badges_selection widget does
What this means for your team
Supported options in Odoo 20
| Option | Type | What it does |
|---|---|---|
badge_limit | number | Displays a dropdown once the badge count is higher than this value. The only declared option, so the only one Studio will offer.(default: 0, meaning unlimited)(since Odoo 20.0) |
allowed_selection_field | field name | <strong>Undocumented.</strong> Names another field on the record holding the list of selection keys to show. Conditional choice filtering with no Python. This is where Odoo 19's selection_badge_with_filter behavior went.(since Odoo 20.0) |
excluded_selection_field | field name | <strong>Undocumented.</strong> The inverse of the above: names a field holding selection keys to hide. Useful when it is easier to compute what is forbidden than what is allowed.(since Odoo 20.0) |
icon_mapping | dictionary of value to icon class | <strong>Undocumented.</strong> Maps each selection value to an icon class shown on its badge. Together with default_icon this replaces Odoo 19's separate selection_badge_icons widget.(since Odoo 20.0) |
default_icon | string | <strong>Undocumented.</strong> Fallback icon class for any value not covered by icon_mapping.(since Odoo 20.0) |
Only badge_limit is in supportedOptions. The other four are read directly in extractProps, so no tooling will suggest them and no documentation mentions them. They are as real as the declared one, and two of them do the most useful thing this widget can do.
Working examples
Four options Odoo never declares
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 19.0 | Not available | Does not exist. The nearest equivalents are selection_badge and selection_badge_icons. |
| Odoo 20.0 | Verified | Introduced in Odoo 20. Verified against the shipped 20.0 source. |
This widget does not exist before Odoo 20.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| Only badge_limit appears in Studio | It is the only declared option; the other four are read but never announced. Set the rest in the view XML. They work despite being undocumented. |
| No badges render at all | allowed_selection_field points at a field that is empty or not loaded in the view, so the filter matches nothing. Add the companion field to the view, invisible if needed, and check its computed value. |
| A user cannot clear the value | Deselection is derived from the field's required state, not from an option. A required field cannot be cleared. Make the field non-required if clearing should be possible. There is no option to override this. |
| selection_badge_with_filter behaves strangely after upgrading | In Odoo 20 that name belongs to an unrelated hr_holidays widget that ignores allowed_selection_field. Migrate to badges_selection, which is what Odoo's own views now use. |
Badges_selection widget vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
badges_selection | A short selection set often, with choices that may depend on another field | Filters choices from another field through an option Odoo never declares |
| badges_many2one | The same badge interface for a many2one | Choices come from a related model rather than a selection list |
| selection_badge | Badges on Odoo 19 | Removed in Odoo 20 |
| statusbar | A pipeline across the top of a form | Different layout, and filtering uses statusbar_visible |
| radio | A short list as radio buttons | No filtering and no icons |
Frequently asked questions
How do I show only some options of a selection field in Odoo 20?+
What options does badges_selection support?+
What replaced selection_badge in Odoo 20?+
Why can users not deselect a badge?+
Workflow rules the interface does not reflect?
Most Odoo databases enforce which status a record can move to in Python and then let the form offer every option anyway. Odoo 20 can filter the choices from a field. We model the transitions properly and make the screen match them.
Talk to an Odoo consultant