Skip to main content
iVentureTeam

many2many_uom_tags

New in Odoo 19, many2many_uom_tags is the tags widget with unit awareness: its dropdown shows each unit of measure alongside what it converts to for the product at hand.

Siddharth JambukiyaSiddharth JambukiyaOdoo Techno-Functional Consultant
August 25, 2026Updated August 25, 20266 min read
Technical namemany2many_uom_tags
Field typesmany2many
Viewsform
Moduleuom, auto-installed with Inventory, Sales, and Purchasing
Used in core2 occurrences in the product module, both on the product template form's uom_ids
VersionsOdoo 20.0, Odoo 19.0
No-code setupNo. Set in XML; Studio's widget list does not offer it.
Alternativesmany2one_uom, many2many_tags, many2many_checkboxes

What the UoM tags field does

Odoo 19 reworked packaging into plain units of measure, and products gained uom_ids, the list of packagings a product can be sold or moved in. Picking the right unit from a bare name list is error-prone, is a Pack of 6 or of 12?, so this widget extends the standard tags field with a smarter dropdown: under each unit's name, a muted second line shows what that unit converts to for this specific product, computed from the UoM factors and rounded with the reference unit's rounding.

The widget resolves which product it is talking about in two ways: on a product form it uses the record itself, and on any other model it follows the many2one named by product_field. It fetches that product's reference unit once, recomputes when the product changes, and multiplies the hints by the quantity in quantity_field when present.

What this means for your team

Unit mistakes are among the most expensive data errors in trading and manufacturing companies: a purchase order in the wrong packaging multiplies a delivery by twelve, and nobody notices until the truck arrives. Surfacing the conversion at the exact moment of selection is a cheap, structural fix, the user picking Dozen sees 12 Units before clicking, and a wrong pick becomes visibly wrong.

Because the widget inherits everything from the tags family, taxonomy governance carries over too: core ships the product form with no_quick_create so users cannot invent a unit from typed text, combined with edit_tags so clicking an existing unit pill opens its record for correction. That combination, curated list plus in-place editing, is the right default for units, which are master data pretending to be tags.

Supported options in Odoo 19

Verified against many2x_uom_tags.js in the Odoo 19.0 uom module. The widget adds two options on top of the color-editable tags descriptor and inherits that entire set; the inherited options are documented on the many2many_tags page and only the two additions are tabled here.

OptionTypeWhat it does
product_fieldfield nameNames the many2one, to product.product or product.template, whose reference unit anchors the conversion hints. Unnecessary on product views, where the record itself is used. A non-product field makes the component throw at setup.(default: product_id)(since Odoo 19.0)
quantity_fieldfield nameNames the float whose value scales every hint, so the dropdown shows totals rather than per-unit ratios. Declared with availableTypes many2one in the source, which is a mislabel; it reads a numeric field.(default: product_uom_qty)(since Odoo 19.0)

Both additions are declared with availableTypes: ["many2one"], and for quantity_field that is wrong. The quantity field it reads is a float like product_uom_qty. The mistyped declaration only affects tooling that filters selectable fields by type; at runtime the widget reads whatever field name you give it. The same quirk exists on the sibling many2one_uom widget.

Working examples

The core pattern: packaging units on the product form

<field name="uom_ids"
       widget="many2many_uom_tags"
       options="{'no_quick_create': True, 'edit_tags': True}"
       groups="uom.group_uom"
       force_save="1"/>

On the product view no product_field is needed: the widget detects it is sitting on product.template and uses the record's own reference unit.

On another model, pointing at the product

<field name="allowed_uom_ids"
       widget="many2many_uom_tags"
       options="{'product_field': 'product_id', 'quantity_field': 'quantity'}"/>

The named product field must be a many2one to product.product or product.template; anything else makes the component throw at setup with an explicit error naming the offending field.

How the conversion hints are computed

The hint line comes from a custom Many2XUomTagsAutocomplete that overrides the search. Instead of name_search, it runs a search_read pulling each unit's factor, relative_factor, relative_uom_id, and parent_path, then builds the hint two ways: units sharing the reference unit's category, detected by comparing the roots of their parent_path, show quantity times relative_factor in their own relative unit, while unrelated units show quantity times factor divided by the reference factor, in the reference unit. Same-family units are then sorted to the top of the dropdown.

Rounding uses the reference unit's own rounding value in 19. This is one of the places the development branch changes: master fetches the Product Unit decimal precision instead and rounds to digits, caching both that lookup and the unit reads through the ORM's new disk cache.

Version compatibility

VersionStatusNotes
Odoo 20.0In developmentNot released. Rebase onto plain tags, color and edit_tags options dropped, and precision-based rounding visible on the development branch; see below.
Odoo 19.0VerifiedVerified against the shipped source. Born with the packaging-as-units rework.
Odoo 18.0Not availableWidget does not exist; packaging used product.packaging records.
Odoo 17.0Not availableWidget does not exist.
Odoo 16.0Not availableWidget does not exist.

Upgrade note. The widget arrived in 19.0 as part of the packaging rework that introduced uom_ids itself, so there is no earlier equivalent to migrate from. Odoo 18 and below model packaging as product.packaging records with ordinary widgets.

What is changing in Odoo 20

Odoo 20 is expected at Odoo Experience in Brussels, 24 to 26 September 2026. The development branch is unstable, so everything below is provisional and re-verified after release.

The rework is substantial for a one-release-old widget. The base class changes from the color-editable tags variant to the plain Many2ManyTagsField, and the descriptor now spreads the plain tags options while filtering color_field out; with the color-editable base gone, edit_tags and no_edit_color disappear from the inherited set as well, which touches core's own current usage. Rounding switches from the reference unit's rounding to the Product Unit decimal precision, and the product and precision lookups move to cached ORM calls. The two declared options survive unchanged.

Common problems and fixes

SymptomCause and fix
Error naming the widget and a product model at loadThe component throws when product_field points at a non-product relation and the view's model is not a product either. Set product_field to a many2one targeting product.product or product.template.
No conversion hints in the dropdownNo product resolved yet, the product field is empty, or the option points at the wrong field. Pick the product first; hints are computed against its reference unit.
Hints show strange totalsquantity_field is scaling them, by design, using its current value. Point quantity_field elsewhere or remove it to get per-unit ratios.
Users create junk units from typed textInline quick-create is inherited from the tags family and on by default. Add no_quick_create, as core's product form does.
Clicking a pill opens the unit formedit_tags is set, as in core's usage; that is its purpose. Remove edit_tags if pills should be inert; note the option disappears on the development branch.

UoM tags field vs the alternatives

WidgetBest forKey difference
many2many_uom_tagsAllowed packagings on products and unit sets needing ratio contextTags dropdown with per-product conversion hints
many2one_uomThe single unit on an order or move lineOne value, paired with product and quantity fields the same way
many2many_tagsAny other tag-like relationSame pills without unit awareness or conversion hints
many2many_checkboxesShort fixed unit listsEvery option visible as a checkbox, no search, no hints

Within the unit family the split is single versus multiple: many2one_uom for one unit on a line, this widget for the set of allowed packagings. Plain many2many_tags remains the fallback when conversion hints are noise.

Frequently asked questions

What does the many2many_uom_tags widget do?+
It renders a many2many of units of measure as tag pills, and its dropdown shows a conversion hint under each unit, what it equals in the product's reference unit, or in its own relative unit for same-family packagings. Odoo 19 uses it for the product form's packaging units.
How does the widget know which product to convert against?+
On product views it uses the record itself. Elsewhere it follows the many2one named by the product_field option, which defaults to product_id and must target product.product or product.template; anything else raises an error at setup.
What is quantity_field for?+
It names a numeric field whose value multiplies every hint. On a line for 5 dozen, the dropdown then shows 60 Units rather than 12, turning the hint into the actual total. Its source declaration mislabels it as a many2one; it reads a float.
Which tags options work on many2many_uom_tags?+
All of them in Odoo 19, because the widget extends the color-editable tags descriptor: no_create, no_quick_create, no_create_edit, color_field, no_edit_color, edit_tags, search_threshold, and the rest. Core combines no_quick_create with edit_tags.
Why are same-category units listed first in the dropdown?+
The custom autocomplete compares each unit's parent_path root with the reference unit's and sorts relatives to the top, so a product measured in Units offers Dozen and Pack before Kilograms. It also phrases their hints in the relative unit for readability.
Is many2many_uom_tags available before Odoo 19?+
No. It shipped in 19.0 with the rework that replaced product.packaging with packaging units on uom_ids. Earlier versions have no equivalent widget.
What changes in Odoo 20?+
The development branch rebases the widget onto the plain tags field, dropping color_field from its options and losing edit_tags and no_edit_color with the old base, and switches hint rounding to the Product Unit decimal precision. Provisional until the September 2026 release, which we re-verify against.

Migrating packagings to Odoo 19's unit model?

The packaging rework behind this widget touches products, stock rules, and every order line that mentions a unit. We plan and execute Odoo migrations, data model included, and untangle UoM structures that grew organically over the years.

Book a free consultation

How this page was produced

This page was verified by reading many2x_uom_tags.js and its template on the Odoo 19.0 branch, confirming absence from 16.0 through 18.0, diffing the development branch where the rebase and rounding changes were found, and checking both core usages on the product form. The screenshot was captured on a clean Odoo 19 database. Corrections are welcome via our contact page.