grouped_view_widget
The grouped_view_widget renders a read-only, grouped table from a JSON string, and it is how the Accrued Orders wizard shows you the entries it is about to book before you commit.
August 25, 2026Updated August 25, 20266 min read
| Technical name | grouped_view_widget |
|---|---|
| Field types | text (JSON string) |
| Views | form (wizard) |
| Module | account, installed with Invoicing or Accounting |
| Used in core | 2 references in 1 module; the single view usage is preview_data on the Accrued Orders wizard |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0 |
| No-code setup | No. Applied in view XML; Studio has no toggle for it |
| Alternatives | one2many, account-tax-totals-field, actionable_errors |
What the grouped view widget does
What this means for your team
Working examples
Parsing, a hardcoded color, and a fossil template
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. Byte-identical JavaScript on the development branch; cosmetic template rewrites only. Re-verified after launch. |
| Odoo 19.0 | Verified | Verified against the shipped source; identical to 18. |
| Odoo 18.0 | Verified | Identical file apart from the removed odoo-module pragma. |
| Odoo 17.0 | Verified | Same behavior; the parsed-value caching from 16 was replaced by the parse-on-render getter. |
| Odoo 16.0 | Verified | Original version with onWillUpdateProps caching and class-style registration; same JSON contract. |
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| The widget renders nothing | The field value is empty or groups_vals is an empty list; the table only renders when at least one group exists. Check the compute actually assigns json.dumps output for the current wizard state. |
| JavaScript error mentioning JSON.parse | The field contains malformed JSON; the widget has no error handling. Always emit with json.dumps and never truncate the string in SQL or XML. |
| Rows are missing but no error shows | Rows must be [0, 0, vals] triples; bare dicts are skipped because the template reads item_vals[2]. Wrap each row dict in the o2m-command triple shape core uses. |
| Cells are empty for one column | The column's field key does not match a key present in the row vals. Align options.columns[].field with the keys emitted per row. |
| Numbers show unformatted or in the wrong locale | The widget applies no formatters; whatever string the server emitted is displayed. Format amounts and dates in the compute with the user's locale before dumping. |
| A sentence says some lines are not shown | The server capped the preview and set discarded_number. Expected; the full set is booked on confirmation even though the preview is truncated. |
Grouped view widget vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
grouped_view_widget | Read-only computed previews inside wizards | Renders a JSON string as a grouped list-styled table with zero interaction |
| one2many | Tables of real (or transient) records | Full record grid with editing, requires the lines to exist as records |
| account-tax-totals-field | The tax totals block on invoices | Also JSON-driven, but purpose-built for tax summaries and editable rounding |
| actionable_errors | Validation summaries with action buttons | JSON-driven list of messages with severity sorting and clickable fixes |
Frequently asked questions
Where does Odoo actually use grouped_view_widget?+
What field type does grouped_view_widget need?+
Why are my rows wrapped in [0, 0, {...}]?+
Can users click or edit anything in the table?+
What does the 'are not shown in the preview' line mean?+
Has grouped_view_widget changed between Odoo 16 and 20?+
Want a see-before-you-post preview in your own wizard?
Dry-run tables are the cheapest trust feature you can add to any batch process: accruals, imports, mass updates, payroll runs. We build preview-first wizards on this exact core pattern for Odoo 16 through 19.
Build my preview wizard