Skip to main content
iVentureTeam

boolean

The default Checkbox for every boolean field in Odoo: what the bare boolean widget does, why it never hides, and when to trade it for a toggle, star, or favorite variant.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 21, 2026Updated August 21, 20268 min read
Odoo 19 form view showing a boolean field rendered by the boolean widget as a standard checkbox, checked, next to its field label.
Studio nameCheckbox
Technical nameboolean
Field typesboolean
Viewsform, list, kanban, settings
Moduleweb, present in every Odoo database
Used in core4 explicit occurrences across 3 modules, including website, hr_recruitment, mrp, plus every boolean field with no widget attribute
VersionsOdoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0
No-code setupYes, via Odoo Studio (Enterprise)
Alternativesboolean_toggle, boolean_favorite, boolean_icon, upgrade_boolean

What the Checkbox field does

Every boolean field in Odoo renders through this widget unless a view says otherwise. It draws a standard checkbox, checked or unchecked, wired to the field's true or false value. Clicking it in an editable view updates the record in memory; the change is written to the database only when the record is saved, which is the key behavioral difference from the self-saving toggle and favorite variants.

The component is deliberately tiny. In the Odoo 19 source it is about 40 lines: a checkbox component, an observer that mirrors the record value into local state, and an update call. Its registry entry declares supportedTypes: ["boolean"] and nothing else. When the field or the view is readonly, the checkbox renders disabled but stays visible.

One subtlety in the descriptor: isEmpty is hardcoded to false. Odoo hides empty fields in some rendering paths, and a false boolean would otherwise look "empty". This line is why an unchecked checkbox still occupies its place on the form instead of vanishing.

What this means for your team

Checkboxes are the smallest decision in a form design, and still one of the easiest to get wrong. The default widget requires a save, which is right for data entry: a user reviewing a supplier form can tick Is a Vendor, keep editing, and discard everything if they change their mind. Nothing has hit the database.

The moment a checkbox is meant to be an action rather than a data value, the default is the wrong widget. Marking a task done, activating a product, starring a favorite: users expect one click to take effect immediately, without hunting for a save button. Odoo core follows exactly this split, using boolean_toggle and boolean_favorite for act-now fields and the plain checkbox for describe-and-save fields. Copying that convention in your own views keeps behavior predictable for users who already know Odoo.

The other business decision is list views. A column of editable checkboxes in a list is an invitation to bulk-edit, which is powerful for an operations team and dangerous on fields that drive automation. If ticking the box triggers a workflow, consider making it readonly in the list and editable only on the form, where the user sees the context.

Setting it up in Odoo Studio (no code)

Booleans are the simplest field to add without a developer. Odoo Studio is available on Enterprise plans.

  1. Open the form you want to change and click Studio in the top menu.

  2. From the Add a field panel, drag Checkbox onto the form. Studio creates a boolean field on the model.

  3. Select the field and open Properties on the right to set the label, help tooltip, and default value.

  4. To change how it renders, set Widget to Toggle for a self-saving switch or Favorite for a star. Leaving it on Checkbox keeps the widget described on this page.

Tip: set the default value in Studio rather than training users to tick the box on every new record. A boolean that should usually be true and defaults to false generates a surprising amount of bad data over a year.

What Studio cannot do here

Studio handles creation, defaults, and the widget swap. What it does not give you for a checkbox:

Immediate save. There is no Studio switch that makes the plain checkbox commit on click. That behavior belongs to the boolean_toggle and boolean_favorite widgets, so the fix is choosing a different widget, not an option.

Conditional visibility based on complex rules. Studio's conditional display covers simple cases; anything involving computed conditions or company-dependent logic needs view XML or a computed field.

Side effects. A checkbox that should trigger anything, an email, a stage change, a recomputation, needs an automation rule or server-side code. The widget itself only writes true or false.

Working examples

The implicit default, no widget attribute needed

<field name="active"/>

Any boolean field renders as this checkbox automatically. This is how nearly all of Odoo's thousands of boolean fields use it.

Explicit spelling, used to override another default

<field name="is_published" widget="boolean"/>

The explicit form matters when a field would otherwise pick up a fancier widget, for example from a view inheriting a parent that set widget="boolean_toggle". Core does this in website and mrp to force the plain checkbox back.

Readonly display in a list

<field name="is_vendor" readonly="1"/>

The checkbox renders disabled but visible. Users can see the state and cannot bulk-flip it from the list.

What the source tells you that the docs do not

Two source-level details are worth knowing.

The value flows through an observer, not straight from the record. The component copies record.data[name] into local state via useRecordObserver and renders from that copy. In practice this means the checkbox updates instantly when an onchange elsewhere on the form flips the boolean server-side, a behavior custom widgets sometimes lose when they read the record only on setup.

isEmpty: () => false is doing quiet layout work. Odoo's form rendering can suppress empty fields, and kanban card templates frequently skip them. Because this widget reports itself as never empty, boolean fields render in both states. If you build a custom boolean widget and forget this line, unchecked fields start disappearing from kanban cards, which looks exactly like a data bug and is not.

There is also a small trap in what the widget does not do: it never saves. In an editable list view, ticking a checkbox puts the row in edit mode and the change is only committed when the row loses focus or the list saves. Users coming from the toggle widget sometimes report the checkbox as "not working" when in fact their edit was discarded by a navigation away from the unsaved row.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. The development branch renders the checkbox as a toggle on small screens; details below.
Odoo 19.0VerifiedVerified against the shipped source. No options, standard checkbox rendering.
Odoo 18.0VerifiedFile is byte-identical to 19.0 apart from a header comment.
Odoo 17.0VerifiedSame modern implementation and behavior as 19.0.
Odoo 16.0VerifiedLegacy class-based implementation, same checkbox behavior and no options.

Upgrade note for 16 to 19. Nothing to do. The widget was rewritten from the legacy class style in Odoo 16 to the modern descriptor in 17, but option surface (none) and behavior are identical, and the 18 and 19 files match byte for byte apart from a header comment. XML written for any version renders the same through 19.

What is changing in Odoo 20

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. Odoo develops in the open, so the notes below are read directly from the public development branch. That branch is unstable and can change until feature freeze; we re-verify this page against the shipped release.

The interesting change is visual: the master-branch template renders the checkbox as a switch-style toggle on small screens. The component gains a displayAsToggle getter returning ui.isSmall, and the template applies the o_boolean_toggle form-switch classes when it is true. Desktop rendering is unchanged, but on phones every plain boolean in your database will look like a toggle while still requiring a save like a checkbox. If your training material screenshots mobile forms, expect them to date.

The registry entry itself is unchanged: still no options, still supportedTypes: ["boolean"], still never empty. The rest of the diff is Odoo's framework-wide migration to the new useProps validation system, with no behavior attached.

Common problems and fixes

SymptomCause and fix
Ticking the box seems to do nothing after leaving the pageThe plain checkbox does not save on click; navigating away discarded the unsaved edit. Save the record, or switch the field to boolean_toggle if immediate saving is the intended behavior.
Options passed to the widget have no effectThe boolean widget declares and reads no options; anything in options="{...}" is ignored. Use boolean_toggle, boolean_favorite, or boolean_icon, which are the variants that actually take configuration.
Checkbox is greyed out and cannot be clickedThe field or the view is readonly, so the underlying CheckBox component renders disabled. Remove the readonly attribute or check record rules and field-level readonly conditions.
A custom boolean widget disappears from kanban cards when uncheckedThe custom descriptor is missing isEmpty: () => false, so false is treated as an empty field. Copy the isEmpty line from the core boolean descriptor into the custom widget.
Checkbox renders as a toggle on phones after upgrading to Odoo 20Expected. The master branch renders plain booleans as switch-style toggles on small screens. No fix needed; behavior (save on record save) is unchanged, only the visual differs.

Checkbox field vs the alternatives

WidgetBest forKey difference
booleanData-entry flags saved with the recordNo self-save and no configuration, the neutral default
boolean_toggleAct-now switches like Active or PublishedSaves the whole record immediately on click
boolean_favoriteStarred or favorite flagsStar icon with an autosave option, on by default
boolean_iconCompact icon buttons in dense formsRenders a configurable icon instead of a box
upgrade_booleanEnterprise-feature settingsOpens an upgrade dialog on Community and reverts the tick

The rule of thumb: checkbox for data you save, toggle or favorite for actions that take effect immediately, icon variants when the form design calls for something less form-like.

Frequently asked questions

Do I ever need to write widget="boolean" explicitly?+
Rarely. It is the default for boolean fields, which is why core spells it out only 4 times. The explicit form is useful when an inherited view set a different boolean widget and you want the plain checkbox back.
Does clicking the checkbox save the record?+
No. It updates the record in memory and the change is written when the record saves. If you need save-on-click, use boolean_toggle, which commits the whole record immediately, including any other pending edits.
What options does the boolean widget support?+
None. The Odoo 19 source declares no supportedOptions and reads nothing from the options dict. Configuration lives in the variants: autosave on boolean_favorite, icon selection on boolean_icon.
Why does an unchecked boolean still show on kanban cards?+
The widget's descriptor hardcodes isEmpty: () => false, so false is a real value rather than an empty field. This is deliberate: hiding unchecked booleans would make them impossible to tick.
Can I add a checkbox field without a developer?+
Yes. Odoo Studio (Enterprise) lets you drag a Checkbox field onto any form, set its label and default, and optionally switch the widget to Toggle or Favorite. Automations triggered by the checkbox are a separate Studio automation rule.
Is the boolean widget changing in Odoo 20?+
Behavior stays the same, but the development branch renders it as a switch-style toggle on small screens via a new displayAsToggle getter. Desktop is unchanged. This is unreleased and we re-verify after Odoo 20 ships in September 2026.

Booleans triggering nothing, or the wrong thing?

A checkbox is rarely just a checkbox: it usually needs a default, a visibility rule, and an automation behind it. We wire Odoo forms so a tick actually drives the workflow, from Studio automation rules to custom modules, on Odoo 16 through 19.

Book a free consultation

How this page was produced

This page was verified by reading boolean_field.js in the Odoo 19.0 web module on GitHub, confirming the absence of supportedOptions and the isEmpty behavior directly in the source, and comparing the same file across the 16.0, 17.0, 18.0, and master branches for the version table and the Odoo 20 section. Widget behavior was checked on a clean Odoo 19 database, where the screenshot was captured. Spotted an error? Tell us and we will correct the page.