| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 214 |
| Technical Name |
many2many_tags_limited |
| License | LGPL-3 |
| Website | https://frsfth25.wordpress.com |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 214 |
| Technical Name |
many2many_tags_limited |
| License | LGPL-3 |
| Website | https://frsfth25.wordpress.com |
Many2Many Tags Limited
Show only what matters - hide the rest behind a clean "+N more" link
When a many2many field holds dozens of records, your form views become cluttered and hard to read.
Many2Many Tags Limited is a drop-in replacement for the standard
many2many_tags widget that lets you cap how many tags are displayed,
then gives users a clear way to see the rest - via inline expand, a popup dialog,
or a proper list view. Zero Python. Pure OWL widget.
Key Features
-
Configurable limit - set any number via the
limit option in your view XML
Three overflow actions - expand inline, open a dialog popup, or open a full list view
"Show less" link - when using expand mode, users can collapse back to the limit
Technical Notes
Extends Many2ManyTagsField from @web/views/fields/many2many_tags
Reads field data from props.record.data[name] - compatible with Odoo 17's relational model
Uses extractProps to correctly forward view XML options into component props
Registered as many2many_tags_limited in the field registry
Bundled via web.assets_backend - no manual JS/CSS linking needed
Use Case
Ideal for any form view where a many2many field can grow large - product tags, account codes,
project members, skill sets, document categories, and more. Instead of a wall of badges
pushing your form layout around, you get a clean, compact display with a single
+N more link that respects the user's time and keeps the UI readable.
Simply swap widget="many2many_tags" for widget="many2many_tags_limited"
and add your preferred options â no other changes required.
<field name="tag_ids"
widget="many2many_tags_limited"
options="{'limit': 3, 'overflow_action': 'dialog'}"/>
Please log in to comment on this module