percentpie
The little circles on a mailing's statistics, Opened 54%, Clicked 12%, are percentpie: a display-only widget that draws a number as a filled circle using nothing but a CSS conic-gradient.
August 19, 2026Updated August 19, 20266 min read
| Studio name | Percentage Pie |
|---|---|
| Technical name | percentpie |
| Field types | float, integer |
| Views | form, kanban (dashboard blocks) |
| Module | web, present in every Odoo database |
| Used in core | 5 occurrences across 1 module: the mailing statistics ratios in mass_mailing |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0 |
| No-code setup | Yes: pick the Percentage Pie widget on an Integer or Decimal field in Studio |
| Alternatives | progressbar, percentage, gauge |
What the PercentPie field does
What this means for your team
Setting it up in Odoo Studio (no code)
What Studio cannot do here
Working examples
One conic-gradient, three quirks
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. Behavior unchanged on the development branch; internal props-schema rework only. |
| Odoo 19.0 | Verified | Verified against the shipped source. |
| Odoo 18.0 | Verified | Byte-identical to 19.0. |
| Odoo 17.0 | Verified | Identical apart from the module pragma line. |
| Odoo 16.0 | Verified | Present with the same rendering. |
Upgrade note. Nothing to migrate: the widget's behavior is identical from Odoo 16 through 19, and views carry over untouched. Only deep CSS overrides written before the CSS-variable colors should be rechecked.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| The circle is nearly empty but the ratio should be 54% | The field stores a fraction (0.54); the widget maps the raw value onto 0 to 100 without scaling. Multiply by 100 in the compute method. The printed number doubling as 0.54% is the giveaway. |
| The circle is always completely full | The value exceeds 100 (for example a count instead of a ratio); the CSS gradient saturates at full. Fix the compute to produce a 0 to 100 ratio, or use progressbar with a max value for open-ended numbers. |
| Users ask to edit the value in the circle | The widget is display-only; there is no input element at all. Percentages like these should be computed. If manual entry is really needed, use the percentage widget instead. |
| You need different colors for good and bad values | The two colors are fixed CSS variables; there is no option or decoration support on the widget. Override --PercentPieField-color-active in SCSS, scoped to a class you set on the field, one scope per color rule. |
| The label under the circle shows the technical field name | No string attribute on the field element and no model-level label. Set string="..." on the field; it is the only prop the widget reads from the view. |
PercentPie field vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
percentpie | A bounded 0 to 100 KPI scanned at a glance | Pure CSS circular gauge; zero options, always read-only |
| progressbar | Progress toward a target that can be exceeded | Horizontal bar with max value, overflow styling and optional editing |
| percentage | An editable percentage in a form or list | Plain formatted number with a % sign; stores fractions, unlike percentpie |
gauge | Dashboard-style dial with a target on kanban cards | A richer graphical gauge, kanban-oriented |
Frequently asked questions
Why does my percentpie show almost 0% when the value is 0.54?+
Can users edit the value inside the pie?+
How do I change the pie's colors?+
Is percentpie heavy to render on kanban cards?+
Where does Odoo itself use percentpie?+
How do I add a Percentage Pie in Studio?+
KPIs your managers can read across the room?
The right widget over the right computed field turns a form into a dashboard, no BI tool needed. We build the ratio fields, pick the gauges, and wire Odoo screens that surface on-time rates, margins and conversion at a glance.
Build our KPI views