popover_widget
An icon in a cell that opens a popover when clicked, with the message, the icon, the color and the position all decided server side and shipped as JSON in a text field.
| Technical name | popover_widget |
|---|---|
| Field types | char |
| Views | list, form, kanban |
| Module | stock, the Inventory app |
| Used in core | 1 occurrence directly, the package list in stock, plus several widgets that extend it |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0 |
| No-code setup | No. The JSON payload has to be computed server side |
| Alternatives | grouped_view_widget, badge, stock_rescheduling_popover, actionable_errors |
What the JSON popover field does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
msg | key in the JSON value | The popover's text. Required unless a custom template is supplied that renders something else. |
icon | key in the JSON value | The icon class shown in the cell. In Odoo 19 this is a Font Awesome class; on the development branch the convention changes to a Material Symbols name.(default: fa-info-circle) |
color | key in the JSON value | The icon's color class, so a warning can be red and a note blue on the same column.(default: text-primary) |
position | key in the JSON value | Which side the popover opens on. Read once when the component starts, so it cannot change per click.(default: top) |
popoverTemplate | key in the JSON value | Names your own template for the popover body. Every other key in the JSON is passed into it as a prop, along with the record.(default: the built-in content template) |
Unknown keys are not ignored. The whole parsed object is spread into the popover's props, so any extra key you put in the JSON is available inside a custom template. That is the documented way to pass data through, and it also means a typo in a documented key silently becomes an unused prop rather than an error.
Working examples
Everything the JSON carries becomes a prop
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | Partial / changed | Not released. The default icon and the documented convention move from Font Awesome to Material Symbols. |
| Odoo 19.0 | Verified | Verified against the shipped source. Unchanged in substance from Odoo 18. |
| Odoo 18.0 | Verified | Identical behavior and the same four documented keys. |
| Odoo 17.0 | Verified | Identical behavior. |
| Odoo 16.0 | Verified | Same JSON contract and defaults. |
Upgrade note. The JSON contract and the four documented keys have been stable since Odoo 16, so server-side code that writes these payloads carries over. Odoo 19 changed nothing but the module marker comment. The change that will need work is the icon naming in Odoo 20, described below.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| The icon shows but the popover is empty | The payload has no message key and no custom template that renders something else. Include the message key, or supply a template that uses the keys you do send. |
| The icon appears on every row | The field is not empty on rows that need no note, or the view has no visibility guard. Add an invisible expression on the field, as the core view does. |
| The icon does not update after a recompute | The payload is parsed once when the component starts. Reload the list; the record's field is correct, only the rendered copy is stale. |
| A custom template gets no data | The keys were misspelled, so they arrive as different props. Match the key names to what the template reads; every key becomes a prop. |
| The position key does nothing | It is read once at setup to configure the popover hook. Expected. The position cannot vary between clicks on the same rendered cell. |
| No icon renders in Odoo 20 | The payload passes a Font Awesome class and the convention has changed to Material Symbols. Update the server-side code that writes the payload. |
JSON popover field vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
popover_widget | Per-row explanations computed on the server and shown on demand | An icon and popover configured entirely by a JSON payload, with unknown keys passed through as props |
| grouped_view_widget | Tabular previews from a JSON payload | Renders a table inline rather than an icon and popover |
| badge | A short state shown inline | Always visible, no popover and no payload |
| stock_rescheduling_popover | Rescheduling explanations in inventory | A widget built by extending this one, with its own behavior |
| actionable_errors | Errors that come with an action to take | Offers buttons rather than static explanatory text |
Frequently asked questions
How is the popover configured?+
Can I pass extra data to a custom template?+
Why does the icon not change after the server recomputes the field?+
What happens if the field is empty?+
What changes in Odoo 20?+
Inventory screens that explain their own exceptions
Blocked packages, late moves and reservation conflicts are easier to fix when the list says why. We build that kind of contextual guidance into Odoo Inventory on versions 16 through 19, server side and in the interface.
Book a free consultation