Skip to main content
iVentureTeam

state_selection

The small gray, red or green bullet on kanban cards and list rows is the state_selection widget. It turns a three value selection field into a one click status dropdown, and its label behavior is stranger than the docs admit.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 20, 2026Updated August 20, 20266 min read
Odoo 19 list view with the state_selection widget open, showing the gray In Progress, red Blocked and green Ready dropdown bullets.
Studio nameLabel Selection
Technical namestate_selection
Field typesselection
Viewsform, list, kanban, activity
Moduleweb, present in every Odoo database
Used in core5 occurrences across 3 modules, including website_event_track, maintenance, stock_fleet
VersionsOdoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0
No-code setupYes. Studio lists it as Label Selection for selection fields.
Alternativesproject_task_state_selection, priority, selection_badge, statusbar

What the Label Selection widget does

The state_selection widget is the traffic light of Odoo. It renders a selection field as a small round bullet that opens a dropdown on click: gray for the first value, red for the value keyed blocked, green for the value keyed done. It is the widget behind the kanban state marker you see on project tasks, event tracks and maintenance requests.

The color mapping is hardcoded in the source. The component keeps a fixed map of blocked: "red" and done: "green" with the CSS prefix o_status_, so a selection whose keys are not literally blocked and done renders every choice as a gray bullet. This is why the widget pairs naturally with Odoo's standard kanban_state field, whose values are exactly normal, done and blocked.

When no value is set, the widget displays the first selection value as the current one instead of showing an empty state. Clicking a choice updates the field and, by default, saves the record immediately.

What this means for your team

For a team this is the fastest status flag in Odoo: one click on a list row or kanban card, no form open, no save button. Support teams mark tickets blocked, event managers approve talks, maintenance planners flag requests as ready, all from the overview screen.

The per record legend feature is the underrated part. If the model has legend_blocked, legend_done and legend_normal fields (project stages do), the dropdown shows stage specific wording such as Ready for Next Stage instead of a generic Done. The same three colors can mean different things in different stages, which keeps the flag meaningful without training anyone.

Setting it up in Odoo Studio (no code)

Studio exposes this widget as Label Selection on selection fields:

  1. Open the view in Studio.

  2. Select the selection field you want to display as a status bullet.

  3. In the properties panel on the left, set Widget to Label Selection.

  4. Optionally toggle Autosave off if you do not want each click to save the record, and use Hide label to control the text next to the bullet.

  5. Close Studio and test a click on the bullet.

What Studio cannot do here

Studio cannot change the color mapping: red and green stay bound to the value keys blocked and done. If your custom selection uses keys like approved or stuck, every bullet stays gray and no Studio setting fixes it; you would need a custom widget or a rename of the selection keys in code. Studio also cannot create the legend_* per record label fields for you.

Supported options in Odoo 19

Odoo 19 declares exactly two options for state_selection, both readable in supportedOptions in the source. The interesting behavior hides in extractProps, described under each option.

OptionTypeWhat it does
autosavebooleanWhen true (the default even if the option is omitted), choosing a state calls record.update with an immediate save of the whole record, including any other pending edits on the row or form. Set it to false to keep the change as a normal unsaved edit. Deleted in the Odoo 20 development branch.(default: true)
hide_labelbooleanControls the text next to the bullet. The quirk: extractProps returns showLabel false whenever this option is absent, so the label is hidden by default and only appears when you explicitly write {'hide_label': False}.(default: true (label hidden))

The label default is the trap: extractProps returns showLabel: false whenever hide_label is absent, so in real views the text label only appears if you explicitly pass options="{'hide_label': False}". The component's declared default of showLabel: true never wins because the view layer always supplies the prop.

Working examples

Standard kanban state on a list or kanban view, exactly as website_event_track ships it:

<field name="kanban_state" widget="state_selection" groups="base.group_user"/>

Show the text label next to the bullet and keep edits unsaved until the user saves the form:

<field name="kanban_state" widget="state_selection"
       options="{'hide_label': False, 'autosave': False}"/>

Per record labels: load the legend fields (invisible is enough) and the dropdown picks them up automatically:

<field name="legend_blocked" invisible="1"/>
<field name="legend_done" invisible="1"/>
<field name="kanban_state" widget="state_selection"/>

Legends, hotkeys and one dead code path

Three behaviors worth knowing, all read from the 19.0 source:

Legends only work if they are in the view. The options getter substitutes record.data['legend_' + state] for each selection label. Record data only contains fields the view loaded, so the legends silently fall back to the generic labels when the legend_* fields are missing from the arch. Odoo's own project views load them invisibly for this reason.

Form views get hotkeys. extractProps sets withCommand only when viewType === "form". The component then registers one command per selection value, with hotkeys Alt+D, Alt+F and Alt+G assigned to the first three values, each labeled Set kanban state as X in the command palette. Values beyond the third get a command without a hotkey.

There is dead code in the label getter. The readonly label path checks record.data['legend_' + value[0]], which takes the first character of the state key (so legend_n for normal). That field name essentially never exists, so the branch never fires and the correctly substituted fallback runs instead. Harmless, but a good reminder that the legend substitution you can rely on is the one in the options getter.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. The autosave option is deleted in the development branch; see below.
Odoo 19.0VerifiedVerified against the shipped source and tested on a clean database.
Odoo 18.0VerifiedSame options and behavior; only an internal dropdown component differs.
Odoo 17.0VerifiedSame two declared options, verified in the 17.0 source.
Odoo 16.0VerifiedSame behavior; autosave and the color map already present in the 16.0 source.

Migrating from Odoo 16, 17 or 18 to 19 requires no XML changes for this widget. The 18 to 19 diff swaps an internal dropdown item component and nothing else.

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.

The autosave option is deleted. Both the declared option and the save flag in the update call are gone on master: clicking a state updates the field but no longer forces a record save, and an existing options="{'autosave': False}" becomes a no op. If your flows rely on the one click save behavior, plan to retest them on 20.

hide_label, the color map, the legend substitution and the form hotkeys are unchanged on master. We will re verify this page against the released branch after the launch.

Common problems and fixes

SymptomCause and fix
Every state shows a gray bullet, even the done oneThe selection keys are not literally blocked and done; the color map is hardcoded to those two keys. Use the standard kanban_state field values (normal, done, blocked) or accept gray bullets; custom colors need a custom widget.
No text appears next to the bullet on the formThe label is hidden by default: without the hide_label option, extractProps passes showLabel false. Add options="{'hide_label': False}" to the field to show the label.
Clicking a state saves the whole record and triggers validation errorsautosave defaults to true and saves every pending edit on the record, so required empty fields block the save. Set options="{'autosave': False}" or fill the required fields first.
Custom dropdown labels per stage are ignoredThe legend_blocked, legend_done and legend_normal fields are not loaded in the view, so record data has nothing to substitute. Add the legend_* fields to the view arch with invisible="1".

Label Selection widget vs the alternatives

WidgetBest forKey difference
state_selectionA one click three state flag (fine, blocked, ready) on cards and rowsColored bullet dropdown with hardcoded red and green for blocked and done
project_task_state_selectionTask states in the project appProject specific fork with its own icons, waiting logic and toggle mode
priorityStar based urgency rankingRenders clickable stars instead of a colored bullet dropdown
selection_badgeChoosing one value from short lists as clickable badgesShows all choices side by side instead of behind a dropdown
statusbarPipeline stages across the top of a formFull width arrow bar for progressing through stages, not a per row flag

Reach for state_selection when the value set is tiny and binary judgment matters (fine, blocked, done). Once you need more than three meaningful states or per state colors of your own, a status bar or badge selection communicates better.

Frequently asked questions

What is the state_selection widget in Odoo?+
It renders a selection field as a small colored status bullet with a dropdown: gray for the first value, red for the value keyed blocked, green for done. It is the widget behind the kanban state on project tasks and many other models.
Why does my custom selection field only show gray bullets?+
The red and green colors are hardcoded to the selection keys blocked and done in the widget source. Any other keys render gray. Use the standard kanban_state values or build a custom widget for other colors.
How do I show the label text next to the state bullet?+
Pass options="{'hide_label': False}". Counterintuitively the label is hidden by default, because the widget's extractProps only shows it when the option is explicitly set to false.
Does clicking a state save the record immediately?+
Yes by default: the autosave option defaults to true and saves the whole record, pending edits included. Set options="{'autosave': False}" to disable that. Note that the Odoo 20 development branch removes this option entirely.
Can I rename the dropdown entries per stage, like Ready for Next Stage?+
Yes. If the model has legend_normal, legend_blocked and legend_done fields and they are loaded in the view (invisible is fine), the widget substitutes their values for the generic selection labels.

Want one click statuses your team actually uses?

Gray bullets that should be green, labels that refuse to show, autosave firing validation errors: state_selection has sharp edges. We wire kanban states, per stage legends and custom status widgets into Odoo 16 to 19 the right way.

Fix my status workflow

How this page was produced

The options table was read from the Odoo 19.0 web module source (state_selection_field.js), including the extractProps path that defaults the label to hidden and the hardcoded color map. Version rows were checked by diffing the same file on the 16.0, 17.0 and 18.0 branches, and the Odoo 20 section against the public development branch on the day of writing. Behavior was confirmed on a clean Odoo 19 database. Spotted an error? Tell us via our contact page and we will fix it.