Skip to main content
iVentureTeam

boolean_icon

A boolean drawn as a single icon rather than a checkbox or a switch. One option changes the glyph, and the label comes from the field's own string.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 27, 2026Updated August 27, 20265 min read
Odoo 19 form showing a boolean rendered as a clickable icon with its label.
Technical nameboolean_icon
Field typesboolean
Viewsform, list, kanban
Moduleweb, present in every Odoo database
Used in coreUsed where a boolean reads better as a symbol than as a control
VersionsOdoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0
No-code setupNo. Studio offers a checkbox or a toggle; this variant is set in view XML
Alternativesboolean, boolean_toggle, boolean_favorite, task_done_checkmark

What the boolean icon field does

Booleans have three sensible renderings in Odoo, and the choice is about meaning rather than taste. A checkbox says this is something you tick. A toggle switch says this is a setting that is on or off. An icon says this is a property of the record, and it happens to be clickable.

This widget is the third. It draws a single icon with the field's label beside it, and clicking flips the value. There is no box, no switch and no visual affordance suggesting a form control, which is exactly what you want when the boolean describes the record rather than configuring it.

The glyph is configurable through one option, and the label is not: it comes from whatever string the field carries in the view, so the widget stays consistent with the rest of the form without extra configuration.

What this means for your team

Interface density is where lists and kanban cards are won or lost. A column of checkboxes reads as a form; a column of icons reads as information. On a card, where every pixel is contested, an icon with a short label conveys the same fact in a fraction of the space.

The rule of thumb worth giving a team: if the user's mental model is I am changing a setting, use the toggle. If it is this record is or is not X, use the icon. The widget is cheap enough that getting this right costs one attribute.

Supported options in Odoo 19

One option is declared, and one prop is derived from the view rather than from options. Read from boolean_icon_field.js, Odoo 19.0.

OptionTypeWhat it does
iconstringThe icon class rendered for the field. Passed straight through to the template, so any glyph the interface supports works.(default: a checked-square glyph)(since Odoo 17.0)
stringstring (attribute)Not an option but the source of the label. The extractor takes the field's string, so the standard attribute controls the text beside the icon.(since Odoo 17.0)

There is no autosave option here. Unlike the toggle widget, this one simply updates the record and leaves saving to the form, so on a list it behaves like any other editable cell rather than committing on click.

Working examples

Default icon

<field name="is_verified" widget="boolean_icon"/>

A checked-square glyph with the field's label beside it.

Choosing the glyph

<field name="is_urgent" widget="boolean_icon"
       options="{'icon': 'fa-exclamation-triangle'}"/>

Any icon class the interface supports works; the widget passes it straight through.

Controlling the label

<field name="is_urgent" widget="boolean_icon"
       string="Urgent"/>

The label is the field's string, so it is changed with the standard attribute rather than an option.

Where the label actually comes from

The component is under forty lines: two props on top of the standard field props, a default for the icon, and an update method that writes the inverted value.

The label prop is the detail worth knowing. Its extractor takes the field's string, which is the same value the form would use for a label elsewhere. That means renaming the field in the view renames the widget's text, with no separate option to keep in step, and it also means the widget always shows a label even where a checkbox would not.

The icon default is a checked-square glyph, which reads naturally for a yes-or-no property. Overriding it is the usual reason to reach for this widget: a flag, a warning triangle, a lock, whatever conveys the property at a glance.

What the widget does not do is as important. There is no read-only branch that changes appearance and no autosave, so it behaves like an ordinary editable field: updating the record and leaving the save to the form. On a list where immediate saving is wanted, the toggle widget is the one with that option.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. The icon convention is updated on the development branch.
Odoo 19.0VerifiedVerified against the shipped source. Identical to Odoo 18.
Odoo 18.0VerifiedIdentical behavior.
Odoo 17.0VerifiedFirst version.
Odoo 16.0Not availableWidget does not exist.

Upgrade note. The widget arrived in Odoo 17 and the Odoo 18 and Odoo 19 files are identical, so views carry over unchanged. It does not exist in Odoo 16, where the same effect required a custom widget.

What is changing in Odoo 20

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. The development branch is unstable and this may still change; we re-verify this page after the release.

The icon convention moves. The development branch updates this widget in line with Odoo's newer icon set, so a view passing an older-style icon class should be re-checked. The option itself, the label handling and the click behavior are unchanged.

Common problems and fixes

SymptomCause and fix
No label appearsThe field has no string in the view and no label to fall back on. Set the string attribute on the field.
The icon does not changeThe option name or the icon class is wrong. Check the spelling of the option and use an icon class the interface actually ships.
Clicking does not saveThis widget has no autosave; it updates the record and leaves saving to the form. Save the form, or use the toggle widget with its autosave option.
It looks the same read-onlyThere is no separate read-only rendering. Use an invisible expression if the field should be hidden rather than shown inert.
It will not attach to my fieldThe declared supported type is boolean only. Point it at a boolean field.
The icon looks wrong after upgradingThe icon convention changes in the next version. Update the icon option to the newer set.

Boolean icon field vs the alternatives

WidgetBest forKey difference
boolean_iconBooleans that describe a record rather than configure itA single clickable icon with the field's own label, and no autosave
booleanValues the user ticksA checkbox, which reads as a form control
boolean_toggleSettings that are on or offA switch, with an autosave option
boolean_favoriteMarking a record as a favoriteA star with fixed labels and immediate saving
task_done_checkmarkCompletion flags in ProjectSaves immediately in lists and kanbans

Use the checkbox where the value is genuinely being ticked, the toggle where it is a setting and immediate saving helps, and this widget where the boolean describes the record. The favorite star is the specialized case of the same idea, and the project and to-do checkmarks are two more.

Frequently asked questions

How do I change the icon?+
With the icon option, which takes an icon class and is passed straight through to the template. The default is a checked-square glyph.
Where does the label come from?+
The field's own string, taken by the extractor. There is no separate label option, so the standard string attribute controls the text.
Does clicking save the record?+
No. Unlike the toggle widget it has no autosave option, so it updates the record and leaves saving to the form.
When should I use it over a checkbox?+
When the boolean describes the record rather than configures it. An icon reads as information; a checkbox reads as something to tick.
Which versions have it?+
Odoo 17 onwards. The development branch updates the icon convention, so icon classes should be re-checked at that upgrade.

Screens that show state without looking like a form

Icons, badges and color are how a dense list stays readable, and the choice differs per screen. We tune Odoo interfaces around what your team scans for, on versions 16 through 19.

Book a free consultation

How this page was produced

The declared option, its default, the label taken from the field string and the absence of an autosave path were read from boolean_icon_field.js on the Odoo 19.0 branch. Version coverage comes from comparing the file across the 16.0, 17.0 and 18.0 branches and against the public development branch. Spotted an error? Tell us and we will correct the page.