Skip to main content
iVentureTeam

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.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 26, 2026Updated August 26, 20265 min read
Technical namemonetary_no_zero
Field typesmonetary
Viewslist (core), form
Modulepurchase
Used in core2 occurrences across 1 module: the billed and purchased columns of the bill line matching list in purchase
VersionsOdoo 20.0, Odoo 19.0, Odoo 18.0
No-code setupNo. Applied in XML; Studio does not list it
Alternativesmonetary, float, float_without_trailing_zeros

What the Monetary no-zero widget does

Odoo's accounting screens print zero amounts as 0.00, which is correct and also visually loud: a matching table where most cells are zero becomes a wall of noise in which the actual amounts hide. monetary_no_zero fixes the display without touching the data.

The implementation is a 12-line subclass of the monetary widget that overrides one getter. Where the base value returns the field's number, this one first asks floatIsZero(value, decimals), using the currency's decimal places when a currency is loaded and 2 otherwise, and returns false for zeros. The formatter downstream renders that as nothing.

Everything else is inherited unchanged from the monetary descriptor: the currency symbol logic, the precision rules, and all four options, including the extractProps-only field_digits.

What this means for your team

The widget was born for a specific accounting workflow: three-way matching between purchase orders and vendor bills. In that list every line carries a Billed and a Purchased column, and on any given line one of them is usually zero. Blanking the zeros turns the table into something a bookkeeper can scan diagonally: filled cells are the story.

The same pattern applies anywhere sparse amounts appear: commission columns that only some lines earn, discount columns used on a few orders, landed cost splits. If your users' first act in a list view is visually filtering out the zeros, this widget does it for them.

The important guarantee for finance teams: it is display-only. Stored values, column sums, exports and reports all still see the true zeros; nothing about the posting changes.

Supported options in Odoo 19

The widget declares no options of its own; all four rows below come from the monetary descriptor it spreads, verified against the Odoo 19.0 source of both files.

OptionTypeWhat it does
currency_fieldfield nameInherited 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_symbolbooleanInherited from monetary. Suppresses the currency symbol in display; the blank-on-zero behavior is unaffected.(since Odoo 18.0)
hide_trailing_zerosbooleanInherited 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_digitsbooleanInherited 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

How core applies it in the bill matching list

<field name="billed_amount_untaxed" widget="monetary_no_zero" sum="Total Billed" string="Billed"/>
<field name="purchase_amount_untaxed" widget="monetary_no_zero" sum="Total Purchased" string="Purchased"/>
<field name="currency_id" column_invisible="1"/>

Note the invisible currency_id: it feeds both the symbol and the zero test's precision.

Using it on your own sparse column

<field name="commission_amount" widget="monetary_no_zero"
       options="{'currency_field': 'company_currency_id'}"/>

Combining with inherited options

<field name="margin" widget="monetary_no_zero"
       options="{'no_symbol': True, 'hide_trailing_zeros': True}"/>

Precision, aggregates, and the false trick

A few source-level details define its exact behavior.

The override sits on the display getter, not the formatter. Because value itself returns false for zeros, every consumer of that getter blanks: the readonly cell, the tooltip and the input's initial content in edit mode. The stored field value is untouched; open the row for editing and typing a real amount works normally.

Near-zero equals zero. floatIsZero(0.004, 2) is true, so amounts below half the currency's smallest unit vanish along with true zeros. That is almost always what an accountant wants in a matching view; it is worth knowing when debugging why a residual 0.004 does not show.

Aggregates ignore the widget. List sum attributes aggregate raw field values server-side, so the totals row keeps counting the hidden zeros, which of course add nothing, and stays consistent with exports.

Name versus file. The registry name is monetary_no_zero; the file and directory are monetary_field_no_zero. Grep for the registration, not the filename, when hunting it in the source.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. Only a props API migration on the development branch; see below.
Odoo 19.0VerifiedVerified against the shipped source; byte-identical to 18.
Odoo 18.0VerifiedWidget introduced by purchase for the bill line matching view.
Odoo 17.0Not availableWidget does not exist; zeros render as 0.00 with the standard monetary widget.
Odoo 16.0Not availableWidget 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

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026, and the development branch may still change before then.

For this widget the branch shows no behavioral change: the only diff is the framework-wide migration to the new useProps API for component props. The zero test, the currency precision logic and the registration are identical. Inherited behavior tracks the base monetary widget, which is also stable on the branch. We re-verify against the shipped release.

Common problems and fixes

SymptomCause and fix
Zeros still show as 0.00The 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 disappearsfloatIsZero 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 amountsThe 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 blanksum 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 tooThe 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

WidgetBest forKey difference
monetary_no_zeroSparse amount columns where zero means nothing happenedBlanks amounts that round to zero at the currency's precision; otherwise identical to monetary
monetaryStandard amount display where zero is real informationAlways prints the formatted amount, including 0.00
floatPlain numbers without currency semanticsNo currency symbol or precision link; 19 adds its own hide_trailing_zeros
float_without_trailing_zerosTrimming decimal noise while keeping zero values visibleStrips trailing zeros from decimals but never blanks a whole value

Choose by what the zero means. If zero is meaningful data, show it with plain monetary. If zero means nothing happened, as in matching and commission columns, blank it with this widget. For trimming decimal noise rather than whole values, hide_trailing_zeros on the base widget is the lighter tool.

Frequently asked questions

What does the monetary_no_zero widget do in Odoo?+
It renders monetary values exactly like the standard monetary widget, except amounts that are zero at the currency's decimal precision display as an empty cell instead of 0.00. Purchase introduced it in Odoo 18 for the bill line matching list.
Does hiding zeros change totals or exports?+
No. The stored value stays zero; list sum totals, group aggregates, exports and reports all use the raw data. Only the on-screen cell is blanked.
Which options does monetary_no_zero support?+
All of monetary's: currency_field, no_symbol, hide_trailing_zeros (19+), and the undocumented field_digits. It adds no options of its own; the blanking is unconditional.
Can I turn the zero-blanking off conditionally?+
Not with an option; the behavior has no switch. Use the standard monetary widget on views where zeros should print, or a decoration attribute if you only want to de-emphasize them.
Why did a tiny amount like 0.004 disappear from my list?+
The zero check is floatIsZero at the currency's decimal places, so anything below half the smallest currency unit counts as zero and blanks out, the same rounding accounting applies elsewhere.

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

How this page was produced

This page was verified by reading monetary_field_no_zero.js in the Odoo 18.0 and 19.0 purchase modules, which are byte-identical, the base monetary_field.js in web for the inherited options, the core usage in purchase_bill_line_match_views.xml, and the development-branch diff for the Odoo 20 section. Corrections are welcome via our contact page.