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.
| Studio name | Label Selection |
|---|---|
| Technical name | state_selection |
| Field types | selection |
| Views | form, list, kanban, activity |
| Module | web, present in every Odoo database |
| Used in core | 5 occurrences across 3 modules, including website_event_track, maintenance, stock_fleet |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0 |
| No-code setup | Yes. Studio lists it as Label Selection for selection fields. |
| Alternatives | project_task_state_selection, priority, selection_badge, statusbar |
What the Label Selection widget does
What this means for your team
Setting it up in Odoo Studio (no code)
What Studio cannot do here
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
autosave | boolean | When 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_label | boolean | Controls 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
Legends, hotkeys and one dead code path
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. The autosave option is deleted in the development branch; see below. |
| Odoo 19.0 | Verified | Verified against the shipped source and tested on a clean database. |
| Odoo 18.0 | Verified | Same options and behavior; only an internal dropdown component differs. |
| Odoo 17.0 | Verified | Same two declared options, verified in the 17.0 source. |
| Odoo 16.0 | Verified | Same 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
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| Every state shows a gray bullet, even the done one | The 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 form | The 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 errors | autosave 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 ignored | The 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
| Widget | Best for | Key difference |
|---|---|---|
state_selection | A one click three state flag (fine, blocked, ready) on cards and rows | Colored bullet dropdown with hardcoded red and green for blocked and done |
| project_task_state_selection | Task states in the project app | Project specific fork with its own icons, waiting logic and toggle mode |
| priority | Star based urgency ranking | Renders clickable stars instead of a colored bullet dropdown |
| selection_badge | Choosing one value from short lists as clickable badges | Shows all choices side by side instead of behind a dropdown |
| statusbar | Pipeline stages across the top of a form | Full width arrow bar for progressing through stages, not a per row flag |
Frequently asked questions
What is the state_selection widget in Odoo?+
Why does my custom selection field only show gray bullets?+
How do I show the label text next to the state bullet?+
Does clicking a state save the record immediately?+
Can I rename the dropdown entries per stage, like Ready for Next Stage?+
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