Skip to main content
iVentureTeam

boolean_toggle_labeled

A boolean toggle that renders its own label, and the only option it has is one Odoo 20 deleted from the entire field library. The widget went too.

September 18, 2026Updated September 18, 20264 min read
Technical nameboolean_toggle_labeled
Field typesboolean
Viewsform
Modulewebsite_hr_recruitment, installed with the online recruitment site
Used in core0 uses in Odoo 19 Community or Enterprise. Removed in Odoo 20.
VersionsOdoo 19.0
No-code setupNo. There is no Studio entry for this widget.
Alternativesboolean_toggle, boolean, boolean_checkbox

What the boolean_toggle_labeled widget does

The class adds nothing but a template. All the interesting content is in the descriptor:

export const booleanToggleFieldLabeled = {
    ...booleanToggleField,
    component: BooleanToggleFieldLabeled,
    displayName: _t("ToggleLabeled"),
    supportedOptions: [
        {
            label: _t("Autosave"),
            name: "autosave",
            type: "boolean",
            default: true,
            help: _t("If checked, the record will be saved immediately when the field is modified."),
        },
    ],
};

It spreads the boolean toggle descriptor, swaps in a component whose only difference is a template that draws the label, and redeclares autosave with its default and help text.

The default matters: true. Flipping this toggle writes to the database straight away unless you explicitly turn that off.

What this means for your team

Autosave on a toggle is a real decision, not a detail. It means a mis-click is committed, with no chance to discard. On a settings screen that is usually what you want, because nobody expects to save a settings page. On a record where the user might change their mind, it is a trap.

Odoo 20 removed the choice entirely. If your team relied on turning autosave off to make a toggle behave like a normal field edit, that protection is gone across every toggle in the system, not only on this widget.

Supported options in Odoo 19

One declared option, plus whatever boolean_toggle supported in Odoo 19 through the descriptor spread. The one declared option is the one Odoo 20 deleted.

OptionTypeWhat it does
autosavebooleanSaves the record immediately when the toggle changes. Declared on this widget with an explicit default of true, so a mis-click is committed unless you set it to False. <strong>Removed from the entire web field library in Odoo 20</strong>, where views setting it are silently ignored.(default: true)

Working examples

In Odoo 19, with autosave left on by default:

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

Turning it off, so the change behaves like a normal edit:

<field name="is_published" widget="boolean_toggle_labeled"
       options="{'autosave': False}"/>

In Odoo 20 neither line works: the widget is gone, and so is the option.

The option outlived the widget by nothing at all

This widget is the clearest single example of one of Odoo 20's larger changes.

We searched addons/web/static/src/views/fields/ on both branches for autosave. On 19.0 it appears in seven files, including boolean_toggle_field.js, priority_field.js, selection_field.js, state_selection_field.js, boolean_favorite_field.js and color_field.js. On 20.0 it appears in none. The option was not deprecated or renamed; it was deleted from the field library.

Four widgets that survive into Odoo 20 lost it as a declared option: boolean_toggle with 156 uses in Odoo 20 core, priority with 65, boolean_favorite with 17 and state_selection with 10. This widget lost it too, and was itself removed.

The consequence is quiet rather than loud. A view carrying options="{'autosave': False}" on a surviving widget installs without error in Odoo 20 and simply ignores the setting. Nothing warns. The toggle behaves however Odoo 20 decides it should, and the protection somebody added deliberately is gone.

If you have ever set autosave anywhere, search your views for it before an Odoo 20 upgrade. It is the sort of change that surfaces as a user complaint months later rather than as a failure on day one.

Version compatibility

VersionStatusNotes
Odoo 19.0VerifiedVerified against the shipped 19.0 source.
Odoo 20.0Not availableWidget removed, and the autosave option deleted library-wide.

Present in Odoo 19, removed in Odoo 20 along with its only option.

What is changing in Odoo 20

Removed. The registration is absent from the 20.0 branch.

More importantly, its one option went with the whole library. autosave no longer exists anywhere under addons/web/static/src/views/fields/ in Odoo 20, having appeared in seven files on the 19.0 branch. Four widgets that survive lost it as a declared option, so this is a system-wide behavioral change rather than a widget-specific one.

Views setting the option still install. They are silently ignored.

Common problems and fixes

SymptomCause and fix
A toggle saves the record on a single clickautosave defaults to true on this widget. On Odoo 19, set options="{'autosave': False}". On Odoo 20 the option no longer exists.
autosave stopped having any effect after upgrading to Odoo 20The option was deleted from the whole web field library, not just from this widget. Remove it from your views. If the behavior matters, it now needs a custom widget.
The widget does not resolve on Odoo 20The registration was removed. Use boolean_toggle and place the label through the view.

Boolean_toggle_labeled widget vs the alternatives

WidgetBest forKey difference
boolean_toggle_labeledA toggle that draws its own label, on Odoo 19Its only option is one Odoo 20 deleted library-wide, and the widget went too
boolean_toggleA toggle in any supported versionNo custom label template, and no autosave option in Odoo 20
booleanA plain checkboxIn Odoo 20 it renders as a toggle on small screens and a checkbox on desktop
boolean_checkboxForcing a checkbox at every screen sizeNew in Odoo 20

boolean_toggle is the nearest survivor and renders the toggle without the custom label template, so the field's ordinary label placement applies. On Odoo 20, note that it no longer accepts autosave either. If a toggle must not commit immediately, that now needs a custom widget rather than an option.

Frequently asked questions

What happened to the autosave option in Odoo 20?+
It was deleted from the entire web field library. It appears in seven files under addons/web/static/src/views/fields/ on the 19.0 branch and in none on 20.0. Views that still set it install without error and are silently ignored.
Which widgets lost autosave in Odoo 20?+
Every widget that had it. Four that survive lost it as a declared option: boolean_toggle, priority, boolean_favorite and state_selection. boolean_toggle_labeled lost it and was itself removed.
What replaces boolean_toggle_labeled?+
boolean_toggle is the nearest survivor, without the custom label template. On Odoo 20 it does not accept autosave either, so a toggle that must not commit immediately now needs a custom widget.

Options that stop working without telling you?

Odoo 20 deletes autosave from every field widget, and a view that sets it installs cleanly and ignores it. We diff your views against the 20.0 branch and surface the settings that will quietly stop applying.

Get an upgrade audit

How this page was produced

Verified by reading addons/website_hr_recruitment/static/src/fields/boolean_toggle_labeled_field.js on the 19.0 branch of a local clone of the official Odoo repository, with the descriptor quoted in full above. The removal comes from a registry diff against the 20.0 branch. The library-wide disappearance of autosave was confirmed by searching addons/web/static/src/views/fields/ in both trees: seven matching files on 19.0, none on 20.0. The Odoo 20 usage counts for the four affected widgets come from scanning every XML file in Community, Enterprise and odoo/addons/base. Corrections welcome via our contact page.