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.
| Technical name | colors_reset_button |
|---|---|
| Views | form (view widget, |
| Module | im_livechat (installed with Livechat) |
| Used in core | 2 occurrences on the im_livechat.channel form, one per color group |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0 |
| No-code setup | No. The widget and its defaults live in view XML; Studio has no reset button component |
| Alternatives | color, color_picker, kanban_color_picker |
What the colors reset button does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
default_colors | dict (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
One-line reset, and a stability streak
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. The development branch file is byte-identical to 19; see below. |
| Odoo 19.0 | Verified | Verified against the shipped source. |
| Odoo 18.0 | Verified | Byte-identical to 19. No changes needed. |
| Odoo 17.0 | Verified | Same behavior; extractProps already narrowed to default_colors. |
| Odoo 16.0 | Verified | Same 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
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| The button does not render and the console shows a props validation error | The 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 form | The 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 later | The 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 reset | Only 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 field | A 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
| Widget | Best for | Key difference |
|---|---|---|
colors_reset_button | A one-click reset of a group of fields to declared defaults | Defaults live in the view XML; the reset is an unsaved in-form update |
| color | Editing a single color value on the form | The field widget users edit; this button resets what those pickers changed |
| color_picker | Choosing from Odoo's fixed 12-color palette | Palette selection bound to an integer field, no free hex values |
| kanban_color_picker | Card color assignment from kanban menus | Lives in kanban card menus and saves immediately on pick |
Frequently asked questions
Is colors_reset_button only for colors?+
Why does my bare widget element crash?+
Does the reset save the record?+
Can I use it outside Livechat?+
Where does Odoo use this widget?+
Has the widget changed across versions?+
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