Skip to main content
iVentureTeam

boolean_toggle_load

A list toggle that writes two fields instead of one. The second is a technical flag telling the server which level triggered the change, which its own comment explains.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 27, 2026Updated August 29, 20264 min read
Technical nameboolean_toggle_load
Field typesboolean
Viewslist
Modulehr_skills, employee skills
Used in coreSkill level lists in hr_skills
VersionsOdoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0
No-code setupNo. It is set in view XML and depends on module-specific data
Alternativesboolean_toggle, boolean_update_flag, boolean, many2many_tags_skills

What the default level toggle does

Skill levels have a default: the level a skill is assumed to be at unless something says otherwise. Marking one level as the default is a toggle, and toggling it has consequences the server has to work out, because only one level per skill can hold that role.

The complication is the same one several Odoo widgets solve in different ways: the server cannot tell a user's toggle from a recomputation caused by another toggle. Both arrive as a write.

This widget answers it by writing a second field at the same time, carrying the same value, whose only job is to say that this change originated here. The comment in the source puts it plainly: the technical field tells the backend which level triggered the change.

What this means for your team

The pattern matters more than the field. Any model where changing one row must adjust the others has this ambiguity, and solving it in the interface, by marking the origin of a change, is often simpler than trying to infer it server side.

What it means in practice for skills is that the default level behaves predictably: setting one clears the others, and the cascade does not fight itself. That is the kind of correctness nobody notices until it is missing.

Supported options in Odoo 19

The widget declares no options of its own and inherits the list toggle's descriptor, including its autosave option. What it adds is the second write, described in the note. Read from boolean_toggle_load.js, Odoo 19.0.

OptionTypeWhat it does
technical_is_new_defaultfield written by literal nameWritten alongside the toggled field with the same value, so the server can tell which level the user actually changed. Its name is fixed in the source.(since Odoo 17.0)
autosavebooleanInherited from the list toggle. Governs whether the paired write is saved immediately.(default: true)

The second field name is hardcoded. It is written literally in the update alongside the toggled field, so the widget only behaves correctly on a model carrying that field. Reusing it elsewhere writes a field that does not exist.

Working examples

The usual usage

<field name="default_level"
       widget="boolean_toggle_load"/>

Toggling writes both the field and the technical flag in one update.

What reaches the server

{ default_level: true,
  technical_is_new_default: true }

Two keys, one update, so the server can act on the origin as well as the value.

The plain list toggle

<field name="default_level" widget="boolean_toggle"/>

One key, and the server cannot tell which row the user actually touched.

Two keys in one write

The whole widget is one overridden change handler. It sets the component's local state, builds an update carrying two keys, and awaits it with the inherited autosave setting applied.

The two keys are the toggled field, taken from the widget's own field name, and a technical field named literally. Both get the new value, which is what lets the server treat the technical one as a marker rather than as data.

Because both go in a single update, the server sees them in the same write and can apply its cascade in one pass. Sending them separately would reintroduce exactly the ambiguity the technical field exists to remove.

The autosave option comes from the list toggle it extends, and in a list that normally means the change is committed at once, which is appropriate for a setting whose cascade should not sit half-applied.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. Behavior unchanged on the development branch.
Odoo 19.0VerifiedVerified against the shipped source.
Odoo 18.0VerifiedSame paired write.
Odoo 17.0VerifiedFirst version.
Odoo 16.0Not availableWidget does not exist.

Upgrade note. The widget arrived in Odoo 17 and needs no view change. Its internals differ slightly between versions, so a customization of the change handler is more likely to need attention than a view.

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.

Behavior is unchanged. The paired write and the technical field name are the same on the development branch. The differences follow the wider component migration and affect patches rather than views.

Common problems and fixes

SymptomCause and fix
Toggling one level does not clear the othersThe technical flag is not reaching the server, so the cascade cannot tell where the change came from. Check the model carries that field and that the widget is in use.
An error about an unknown fieldThe widget was used on a model without the technical field, whose name is hardcoded. Use it only on the skills level model, or copy the widget with your own field name.
The change is not savedThe inherited autosave option was turned off. Leave it on, or save the form.
The toggle looks like a checkboxA different widget is in use. Check the widget attribute on the field.
The cascade applies twiceSomething else is also writing the technical field. Search for other writers on that field.
Missing widget errorThe skills module is not installed in that database. Install it, or use the plain list toggle.

Default level toggle vs the alternatives

WidgetBest forKey difference
boolean_toggle_loadToggles whose change must be distinguishable from a recomputationWrites a technical origin flag alongside the value in a single update
boolean_toggleOrdinary togglesOne key, and no way for the server to tell where the change came from
boolean_update_flagThe same problem solved by comparisonCompares against a reference value rather than marking the origin
booleanA plain checkboxNo toggle styling and no second write
many2many_tags_skillsSkills shown as tagsA relation rather than a level flag

Use the plain list toggle where nothing cascades. Where the distinction between a user change and a recomputation matters, the update-flag widgets in the Survey app solve the same problem with a comparison rather than a marker, and are worth comparing before writing your own.

Frequently asked questions

Why does it write two fields?+
Because the server cannot otherwise tell a user's toggle from a recomputation caused by another row. The second field marks the origin, and the source comment says exactly that.
Can I use it on another model?+
Not without changes. The technical field name is written literally in the update, so on another model it would write a field that does not exist.
Does it save immediately?+
It honors the inherited autosave option, which in a list normally means yes. That suits a setting whose cascade should not sit half-applied.
Why not solve this on the server?+
Both a user change and a recomputation arrive as a write, so the origin has to be marked somewhere. Marking it in the interface is the cheaper of the two options.
Which versions have it?+
Odoo 17 onwards, with the same paired write and unchanged behavior on the development branch.

Skills data that stays consistent as it grows

Skill types, levels and the defaults behind them are configuration that quietly shapes every employee record. We implement Odoo HR skills and the reporting on top of it, on versions 16 through 19.

Book a free consultation

How this page was produced

The paired write, the hardcoded technical field name, the source comment explaining it and the inherited autosave handling were read from boolean_toggle_load.js on the Odoo 19.0 branch, with the inherited option set read from the list toggle in web. Version coverage comes from comparing the file across the 17.0 and 18.0 branches and against the public development branch. Spotted an error? Tell us and we will correct the page.