monetary_no_zero
monetary_no_zero is the standard monetary widget with one refinement: amounts that round to zero in the currency's precision render as an empty cell instead of 0.00. Purchase built it to keep its bill matching list readable.
| Technical name | monetary_no_zero |
|---|---|
| Field types | monetary |
| Views | list (core), form |
| Module | purchase |
| Used in core | 2 occurrences across 1 module: the billed and purchased columns of the bill line matching list in purchase |
| Versions | Odoo 20.0, Odoo 19.0, Odoo 18.0 |
| No-code setup | No. Applied in XML; Studio does not list it |
| Alternatives | monetary, float, float_without_trailing_zeros |
What the Monetary no-zero widget does
What this means for your team
Supported options in Odoo 19
| Option | Type | What it does |
|---|---|---|
currency_field | field name | Inherited from monetary. Names the many2one currency field that drives the symbol, the precision, and this widget's zero test. Falls back to the field definition's currency_field, then to currency_id.(default: currency_id)(since Odoo 18.0) |
no_symbol | boolean | Inherited from monetary. Suppresses the currency symbol in display; the blank-on-zero behavior is unaffected.(since Odoo 18.0) |
hide_trailing_zeros | boolean | Inherited from monetary. Trims zeros after the last significant decimal on the amounts that do render, so 1.20 prints as 1.2.(since Odoo 19.0) |
field_digits | boolean | Inherited from monetary and undocumented there: read only in extractProps, it switches precision from the currency's decimals to the field definition's digits. The zero test still uses the currency's decimals.(since Odoo 18.0) |
The blank threshold follows the currency. floatIsZero uses the currency's decimal_places, so in a zero-decimal currency like JPY any amount under 0.5 rounds to zero and blanks out, while a 4-decimal currency keeps 0.001 visible. If the currency field is not loaded in the view, the fallback precision is 2.
Working examples
Precision, aggregates, and the false trick
Version compatibility
| Version | Status | Notes |
|---|---|---|
| Odoo 20.0 | In development | Not released. Only a props API migration on the development branch; see below. |
| Odoo 19.0 | Verified | Verified against the shipped source; byte-identical to 18. |
| Odoo 18.0 | Verified | Widget introduced by purchase for the bill line matching view. |
| Odoo 17.0 | Not available | Widget does not exist; zeros render as 0.00 with the standard monetary widget. |
| Odoo 16.0 | Not available | Widget does not exist. |
Upgrade note. The widget appears in Odoo 18; on 16 or 17 the same XML falls back to the standard field rendering with visible zeros after a Missing widget warning in the console. Backporting is trivial, the subclass is 12 lines, but the registered name must match.
What is changing in Odoo 20
Common problems and fixes
| Symptom | Cause and fix |
|---|---|
| Zeros still show as 0.00 | The view names the standard monetary widget, or runs on Odoo 17 or earlier where monetary_no_zero does not exist. Check the widget attribute spelling (monetary_no_zero) and the Odoo version; look for a Missing widget console warning. |
| A small residual amount like 0.004 disappears | floatIsZero rounds at the currency's decimal places, so sub-precision residuals count as zero. Expected behavior; use field_digits or a higher-precision currency if residuals must stay visible. |
| No currency symbol on the amounts | The currency field is not loaded in the view, which also drops the precision to the fallback of 2. Add the currency field to the view, invisible is fine, as the core matching list does. |
| Column total shows even though every visible cell is blank | sum aggregates raw values server-side and renders independently of the cell widget. Expected; the total is consistent with the stored data, not with what is displayed. |
| The cell is blank in edit mode too | The value getter returns false for zeros, which also seeds the edit input empty. Type the amount; entry works normally. Use plain monetary where users must see an explicit 0.00 to edit. |
Monetary no-zero widget vs the alternatives
| Widget | Best for | Key difference |
|---|---|---|
monetary_no_zero | Sparse amount columns where zero means nothing happened | Blanks amounts that round to zero at the currency's precision; otherwise identical to monetary |
| monetary | Standard amount display where zero is real information | Always prints the formatted amount, including 0.00 |
| float | Plain numbers without currency semantics | No currency symbol or precision link; 19 adds its own hide_trailing_zeros |
| float_without_trailing_zeros | Trimming decimal noise while keeping zero values visible | Strips trailing zeros from decimals but never blanks a whole value |
Frequently asked questions
What does the monetary_no_zero widget do in Odoo?+
Does hiding zeros change totals or exports?+
Which options does monetary_no_zero support?+
Can I turn the zero-blanking off conditionally?+
Why did a tiny amount like 0.004 disappear from my list?+
Accounting screens your team can actually scan?
From three-way matching tuning to custom financial list views that hide the noise and surface exceptions, we shape Odoo purchase and accounting workspaces around how your finance team reads numbers, on Odoo 16 to 19.
Streamline my finance views