gauge
The gauge widget turns an integer or float into a half-doughnut Chart.js gauge, mostly on kanban dashboards. Its most important fact is a naming bug: the declared max_value_field option is dead, and max_field is the one that works.
| Technical name | gauge |
|---|---|
| Field types | integer, float |
| Views | kanban, form |
| Module | web since Odoo 17; web_kanban_gauge in Odoo 16 |
| Used in core | 2 occurrences across 2 modules: crm team member kanban and the gamification goal kanban |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0 |
| No-code setup | No. Studio's widget list for numeric fields offers Percentage Pie and Progress Bar, not Gauge; the widget is set in XML. |
| Alternatives | percentpie, progressbar, skill_match_gauge_field |
What the Gauge widget does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
max_field | field name | The option that actually works: names an integer or float field on the same record supplying the gauge maximum. The field must be loaded in the view. Beats max_value when set. |
max_value | number | Static maximum used when no max_field is set. The scale silently grows to the current value whenever the value exceeds it.(default: 100) |
title | string | Text above the chart. Falls back to the field's label when omitted. |
max_value_field | field name | Declared in the options metadata but dead: extractProps never reads this name. Use max_field instead. Mismatch present from Odoo 17 through the development branch.(since Odoo 17.0) |
The declared option name is dead. The metadata announces max_value_field, which is what Studio-style tooling displays, but extractProps reads options.max_field. Set max_value_field in XML and it is ignored; set max_field and it works. The mismatch was born in Odoo 17 when the widget moved into web and gained declarations, and it is still present on the development branch. Core's own CRM view uses max_field.
Working examples
Fossil options in core views
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. A max_tooltip option and a chart-hook rewrite are visible on the development branch; see below. |
| Odoo 19.0 | Verified | Verified against the shipped source; identical to 18.0. |
| Odoo 18.0 | Verified | Byte-identical to the 19.0 source. |
| Odoo 17.0 | Verified | Widget moved into the web module; option declarations added, including the dead max_value_field name. |
| Odoo 16.0 | Verified | Ships from the auto-installed web_kanban_gauge module with the same working options and no declarations. |
Upgrade note for 16 to 17. In Odoo 16 the widget ships in the auto-installed web_kanban_gauge module and loads Chart.js directly; 17 moved the file into web and switched to the bundled chart library. The widget name and the working option names, max_field, max_value, title, are identical across the move, so views migrate untouched. Only JavaScript patches against the old module path break.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| max_value_field is ignored | The declared option name is dead; the code reads max_field. Rename the key to max_field in your options dict. |
| Gauge always looks full when over target | The maximum is raised to the value on overshoot by design. Show overshoot elsewhere, with a decoration or percentpie, or accept the stretched scale. |
| Gauge renders against 100 instead of my max field | The max field is not loaded in the view, so its value reads as undefined and the 100 default wins. Add the max field to the view, invisible if needed. |
| Nothing renders at all | Chart.js bundle failed to load, or the widget sits on a non-numeric field, which the descriptor does not prevent. Check the browser console for the asset error and confirm the field is integer or float. |
| label_field or style options do nothing | Fossil options from the pre-Owl implementation; core's own gamification view still passes them. Remove them; use title for the caption and CSS classes for sizing. |
Gauge widget vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
gauge | Quota and capacity dashboards on kanban cards | Half-doughnut chart with a record-driven maximum |
| percentpie | Percentages of a fixed whole | CSS conic-gradient circle, no Chart.js, saturates at 100 |
| progressbar | Compact progress in lists and kanbans | Linear bar with color thresholds instead of a chart |
| skill_match_gauge_field | Recruitment skill matching only | Gauge subclass hardwired to job-matching context and colors |
Frequently asked questions
How do I set the maximum of the Odoo gauge widget?+
Why is max_value_field not working?+
What happens when the value exceeds the gauge maximum?+
Which field types work with the gauge widget?+
Can I add a gauge from Odoo Studio?+
Is the gauge widget available in Odoo 16?+
What changes for the gauge in Odoo 20?+
Dashboards your team actually reads
A gauge is one widget on one card; a useful dashboard is quotas, targets, and the computed fields behind them. We design and build custom Odoo dashboards and KPI views, dead options avoided, for companies on Odoo 16 through 19.
Book a free consultation