account-tax-totals-field
The untaxed, tax and total block at the bottom right of every Odoo invoice is one widget: account-tax-totals-field. It renders a JSON payload, and it quietly lets you type over a computed tax amount.
| Technical name | account-tax-totals-field |
|---|---|
| Field types | JSON value (no supportedTypes declared; core stores it in a computed binary field) |
| Views | form (invoices, bills, sales orders, purchase orders) |
| Module | account, with template overrides shipped by sale and purchase |
| Used in core | 3 occurrences across 3 modules: account, sale, purchase |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0, Odoo 17.0, Odoo 16.0 |
| No-code setup | No. Core wires it to the tax_totals field; Studio does not offer it |
| Alternatives | monetary, statinfo, float |
What the Tax Totals widget does
What this means for your team
Working examples
How editing a tax amount actually works
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. Development branch adds an in-widget cash rounding dropdown and migrates to the signals frontend. Re-verified after launch. |
| Odoo 19.0 | Verified | Behavior verified against the shipped source; identical to 18.0. |
| Odoo 18.0 | Verified | Byte-identical file to 19.0. |
| Odoo 17.0 | Partial / changed | Widget exists with the same name but the JSON uses tax_group_amount and tax_group_id keys. |
| Odoo 16.0 | Partial / changed | Same older JSON contract as 17.0. |
Upgrade note for 16 and 17. The JSON contract was renamed: 16.0 and 17.0 used tax_group_amount and identified groups by tax_group_id, while 18.0 and 19.0 use tax_amount_currency on groups identified by id, with deltas propagated into subtotals and totals. Any integration or report that parses tax_totals JSON must map keys when crossing an Odoo migration. 18.0 and 19.0 are byte-identical.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| Widget not rendering, field shows raw JSON or nothing | The widget name is hyphenated; account_tax_totals_field with underscores silently falls back to default rendering. Use widget="account-tax-totals-field" exactly. |
| Tax amount not clickable | The field is readonly, which core sets whenever the document is not a draft. Reset the document to draft; the totals become editable again. |
| Typing 0 as the tax amount does nothing | The widget explicitly refuses a zero value and returns the cell to read-only. A genuinely zero tax belongs in tax configuration, not a manual edit. |
| Edited tax reverts after saving | Server-side recomputation of tax_totals ran again, for example after a line changed. Make the manual adjustment last, after all lines are final. |
| Crash or empty block on a custom model | The model lacks currency_id or the field's JSON does not follow the core contract. Expose currency_id and build the JSON with the core tax totals helpers. |
Tax Totals widget vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
account-tax-totals-field | The computed totals block on invoices, bills and orders | Renders one JSON payload and allows delta-edits to tax group amounts on drafts |
| monetary | Showing a single currency amount | One field, one number; no groups, no editing logic |
| statinfo | Numbers inside smart buttons | Display-only formatting inside a navigation button |
| float | Plain numeric fields | No currency formatting, no JSON awareness |
Frequently asked questions
What is the account-tax-totals-field widget?+
Why can I edit the tax amount on a draft invoice?+
Why is the widget name hyphenated?+
Can I use account-tax-totals-field on my own model?+
Did the tax_totals JSON change between versions?+
What is changing in Odoo 20?+
Tax totals that will not tie out?
Rounding differences, localization tax reports, or an integration that parses tax_totals JSON and broke on upgrade: these are accounting-engine problems, not view problems. We debug and build Odoo tax and invoicing customizations across versions 16 through 19, with Odoo 20 already on our bench.
Fix my tax setup