Skip to main content
iVentureTeam

colors_reset_button

The little refresh icon next to Odoo Livechat's color pickers is colors_reset_button: a one-click view widget that puts a set of fields back to the defaults you declare in the XML, and crashes if you forget to declare them.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 26, 2026Updated August 26, 20265 min read
Technical namecolors_reset_button
Viewsform (view widget, element)
Moduleim_livechat (installed with Livechat)
Used in core2 occurrences on the im_livechat.channel form, one per color group
VersionsOdoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0
No-code setupNo. The widget and its defaults live in view XML; Studio has no reset button component
Alternativescolor, color_picker, kanban_color_picker

What the colors reset button does

When a form lets users tune a group of settings, brand colors in the core case, someone will eventually want the factory values back. colors_reset_button is Odoo's smallest answer: a view widget that renders a refresh icon and, on click, writes a hardcoded dictionary of defaults into the record's fields.

The defaults are not baked into the widget. They arrive through the default_colors option in the view XML, one dictionary per placement, which is how the same widget resets the Livechat button colors in one group and the chat window colors in another, each to its own values.

What this means for your team

The pattern this widget encodes, editable settings with a visible escape hatch, is what keeps configuration screens safe to explore. A marketer can experiment with Livechat branding knowing the factory look is one click away, so fewer support tickets start with we changed the colors and cannot get them back.

Because the widget is generic under the hood, it is also a ready-made piece for custom settings pages: any group of fields with sensible defaults, margins, thresholds, template choices, can get the same reset affordance by reusing this component or copying its twenty-line pattern into your own module.

Supported options in Odoo 19

Verified in colors_reset_button.js, Odoo 19.0 im_livechat module: one option, read explicitly from the options dictionary by extractProps.

OptionTypeWhat it does
default_colorsdict (option)Required. A dictionary of field name to reset value, applied via record.update on click. Only the listed fields change, and despite the name the values need not be colors.

The option is mandatory. The component declares default_colors as a required prop of type Object. A bare <widget name="colors_reset_button"/> does not degrade gracefully; it throws a props validation error in the console and the button does not render.

Working examples

Core's Livechat button colors

<widget name="colors_reset_button"
        options="{'default_colors': {'button_background_color': '#878787', 'button_text_color': '#FFFFFF'}}"/>

Placed right after the two color fields it resets, inside the same group.

Resetting any fields on a custom form

<widget name="colors_reset_button"
        options="{'default_colors': {'header_color': '#875A7B', 'accent_color': '#00A09D', 'footer_note': 'Powered by us'}}"/>

The keys are field names and the values are what they reset to; nothing restricts them to colors, only the option's name suggests it.

One-line reset, and a stability streak

The whole component is small enough to audit in a minute, and two details are the ones that matter. The click handler is a single record.update(this.props.default_colors): an in-memory update that marks the form dirty and triggers onchange logic, with no save and no confirmation. Users can still discard. That makes it forgiving, but it also means the reset is not logged anywhere until the form is saved like any other edit.

The history of extractProps is a nice miniature of Odoo's widget API tightening. In 16 it forwarded the whole attrs.options object as props, so any stray key in the options dictionary would break props validation. Since 17 it plucks exactly options.default_colors, and the file has been byte-identical from 18 through the development branch, our diff of 19 against master came back empty, a stability streak few widgets manage.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. The development branch file is byte-identical to 19; see below.
Odoo 19.0VerifiedVerified against the shipped source.
Odoo 18.0VerifiedByte-identical to 19. No changes needed.
Odoo 17.0VerifiedSame behavior; extractProps already narrowed to default_colors.
Odoo 16.0VerifiedSame widget; extractProps forwarded the whole options object, so extra option keys broke rendering.

Upgrade note. Nothing to do between 16 and 19 for standard usage. Only 16-era custom views that stuffed extra keys into the options dictionary relied on the old forward-everything extractProps and would need those keys removed.

What is changing in Odoo 20

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. We read the widget's file on the public development branch at the time of writing; the branch is unstable and this page will be re-verified after release.

Zero changes: the development branch file is byte-identical to Odoo 19, option, props, template and registration alike. Even the icon markup has not joined the ongoing FontAwesome replacement wave yet.

Common problems and fixes

SymptomCause and fix
The button does not render and the console shows a props validation errorThe default_colors option is missing or misspelled; it is a required Object prop. Pass options="{'default_colors': {...}}" with at least one field-value pair.
The button is invisible on the formThe template carries oe_edit_only, and some themes or readonly contexts hide that class. Open the form in edit context; in readonly the button is hidden by design.
Clicking resets the fields but the change disappears laterThe reset is an in-memory record.update; discarding the form reverts it. Save the form after resetting, like any other edit.
Some fields did not resetOnly the keys listed in default_colors are updated; other fields are untouched. Add every field that should reset to the dictionary.
Crash on click referencing an unknown fieldA key in default_colors names a field the record does not have loaded. Match the keys to real fields of the model present in the view.

Colors reset button vs the alternatives

WidgetBest forKey difference
colors_reset_buttonA one-click reset of a group of fields to declared defaultsDefaults live in the view XML; the reset is an unsaved in-form update
colorEditing a single color value on the formThe field widget users edit; this button resets what those pickers changed
color_pickerChoosing from Odoo's fixed 12-color palettePalette selection bound to an integer field, no free hex values
kanban_color_pickerCard color assignment from kanban menusLives in kanban card menus and saves immediately on pick

This widget resets values; the color widgets beside it are what users edit. They are complements, and the core form shows the intended pairing: pickers first, reset button last in the row.

Frequently asked questions

Is colors_reset_button only for colors?+
No. The option name says colors, but the handler is a plain record.update of whatever dictionary you pass. Any field type that accepts a direct value works, which makes it a generic reset-to-defaults button.
Why does my bare widget element crash?+
default_colors is declared as a required prop of type Object. Without the option, props validation fails and the component never mounts. The source even carries a comment noting the option must be specified at usage.
Does the reset save the record?+
No. It updates the record in memory, marking the form dirty and firing onchanges. The user still saves or discards normally.
Can I use it outside Livechat?+
Yes, as long as the im_livechat module is installed, the widget is in the global view widgets registry and works on any form. For a dependency-free version, its twenty-line pattern is trivial to replicate in your own module.
Where does Odoo use this widget?+
Twice on the Livechat channel form: one instance resets the chat button's background and text colors, the other resets the chat window's header and title colors, each with its own default dictionary.
Has the widget changed across versions?+
Barely. Since 17 the code is stable and from 18 onward the file is byte-identical, including on the Odoo 20 development branch at the time of writing.

Building settings screens users cannot break?

Safe-to-explore configuration, sensible defaults and one-click recovery are small touches that decide whether a team trusts its Odoo setup. We build custom settings pages and portal branding flows with exactly this kind of guardrail thinking.

Design your settings UX with us

How this page was produced

The option, required prop and click behavior were read from colors_reset_button.js and its template in the Odoo 19.0 im_livechat module, compared against 16.0 through 18.0 and the development branch, and both usages were verified in im_livechat_channel_views.xml. Spotted an error? Tell us and we will correct the page.