One2many Filter, Search, Bulk Edit, Mass Edit & Excel Import/Export | Table Filter | Enhanced O2M List Widget
by Meisanqo$ 90.25
O2M Enhanced — The Missing Toolbox for One2many Lists
One drop-in widget that upgrades Odoo's embedded one2many lists with the capabilities users expect from a spreadsheet: Excel-like filters, bulk edit, XLSX export & import, paste from Excel, line duplication, hierarchy view. Enable it on any table from the Settings UI — no XML needed.
Why this module?
Odoo's embedded one2many lists (order lines, move lines, BoM components, ...)
are bare tables: no search, no export, no quick line operations. Once a document
has dozens or hundreds of lines, working with them means paging and scanning by
eye. O2M Enhanced fixes that with a single widget — enabled from
the UI in two clicks, or with widget="one2many_enhanced" in the
view XML. It is a pure client-side widget: no model changes, no stored data,
nothing written behind your back.
No-code setup — enable it on any table from the UI
- Settings › Technical › User Interface › Enhanced Tables: pick a model and one of its one2many tables, tick the tools you want — every form view showing that table gets the enhanced widget instantly. No view XML, no code change needed.
- All options in the form — open filters by default, remember column widths, disable any individual tool, pin the hierarchy field, exclude columns from filtering.
- Custom widgets are respected — if a table already uses a specialized widget (like the sale order lines' sections & notes), the setup warns you and leaves it untouched, unless you explicitly enable Override Custom Widget.
- Dedicated access right — only users with the Enhanced Tables / Manager right (administrators out of the box) can manage the setups.
Available now: column filtering suite
- Per-column filters, adapted to each column's type:
- Text columns: instant "contains" search
- Number columns: plain search that matches both the displayed
25,000.00and the raw25000, ranges (0 - 10,5 -) and operators (>5,<=100,!=0) - Selection columns: multi-select checklist; boolean columns: dropdown
- Date / datetime columns: from–to range with the native date picker
- Many2one / x2many columns: multi-select checklist of the values in use
- Cross-page filtering — all pages are loaded so filters search the whole recordset, and the pager pages through the filtered result.
- Match highlighting — the matching text is highlighted live in text and number columns as you type.
- Live counter & clear-all — a "shown / total" badge and a one-click button to reset every filter.
- Filtered totals — footer aggregates (sum, average, min, max) are recomputed on the visible, filtered rows.
- Edit-safe — the row you are editing or just added never disappears behind an active filter.
Excel export & import — the round-trip workflow
- One-click XLSX export of the visible rows — filter first and export just the matching lines. The file starts with an
IDcolumn, so it doubles as an update template. - Import from XLSX or CSV: rows with an ID update the matching line, rows without an ID are added as new lines. Export → edit in Excel → re-import: bulk line updates without leaving the form.
- Smart cell matching — many2one cells are resolved by name, many2many cells as comma-separated tag names (replacing the line's tags), selection cells by label or value, booleans accept TRUE/FALSE/1/0, dates use ISO or your locale format.
- Duplicate names handled — if several records share the same name (two "John Smith" contacts), the row error lists the candidates with their IDs and an
[ID]suffix in the cell (John Smith [42]) picks one explicitly. - Paste straight from Excel — copy cells in your spreadsheet and paste them into the list, no file needed. Headers are auto-detected, and a live preview shows how many lines will be updated or created before you confirm.
- Nothing is written behind your back — imported changes are staged on the form exactly like manual edits: review them, then save the record to apply or discard to cancel. A summary notification reports updated/created counts and any row errors.
Line duplication
- Duplicate the selection — select one or more lines and copy them all from the toolbar.
- Confirmation with a copy count — a small dialog guards against misclicks and lets you create up to 50 copies of each selected line at once.
- Complete copies — tags (many2many values) are copied too; computed fields are recomputed. Copies are staged and applied when you save the record.
Bulk edit — unique to this module
- Row selection in one2many lists — core Odoo offers neither selection checkboxes nor multi-edit inside embedded lists.
- Filter-aware select all — the killer workflow: filter → select all → set a value on every matching line at once.
- Type-aware value dialog — number inputs, native date pickers, selection dropdowns, boolean checkbox, many2one resolved by name. Leave empty to clear the field.
- Selection totals — while rows are selected, the footer aggregates show the selection's sums.
- Staged, reviewable — like every write feature in this module, changes land on the form unsaved: review and save, or discard.
Hierarchy view
- Indented tree in the list — when lines have a parent/child relationship (a self-referencing many2one), one toolbar toggle turns the flat list into a collapsible tree.
- Zero configuration — the hierarchy field is auto-detected, or pinned with the
hierarchy_fieldoption. - Filter-aware — filter first, then view the matching rows as a tree.
Persistent column widths
- Resize once, keep forever — drag the header separators to adjust a column; the widths are saved the moment you release the drag and survive page refreshes and navigation.
- Per user, per list — each user keeps their own widths for each one2many table (stored in the browser, nothing written to the database).
- Layout-proof — the saved widths are re-applied when the form re-renders or the available space changes (window resize, chatter or sidebar toggle).
- One-click reset — a Reset column widths button appears in the toolbar only when custom widths exist and restores Odoo's automatic layout.
- Optional — turn it off per table with the Remember Column Widths switch in the setup form, or
save_column_widths: falsein the view XML.
Safe by design
- Read-only is always respected — columns read-only on the model or in the view (including record-dependent readonly rules) are never modified by bulk edit, import, paste or duplication.
- Permissions too — no tool adds lines when the list forbids creation, or stages edits when the field is read-only.
- Everything is staged — every write feature lands its changes on the form unsaved, exactly like manual edits: review and save, or discard. Odoo's access rights and business rules apply on save, as always.
Usage
From the UI (recommended): open Settings › Technical › User Interface › Enhanced Tables, create a setup, pick the model and its one2many table, choose the options and save — done.
Or in the view XML: add the widget to any one2many field in a form view:
<field name="order_line" widget="one2many_enhanced">
<list>
<field name="product_id"/>
<field name="name"/>
<field name="product_uom_qty"/>
<field name="price_subtotal" sum="Total"/>
</list>
</field>
Then click the filter icon above the table to open the filter row. Press Escape in any filter input to close it and restore the list.
Every tool is configurable per view through the standard options dict:
default_open, disable_filter, disable_export,
disable_import, disable_bulk_edit, disable_duplicate,
disable_selection, disable_hierarchy, hierarchy_field,
no_filter_columns, save_column_widths.
Options written in the XML keep precedence over the UI setup.
Known limitations
- Grouped embedded lists are not supported — the filter button is hidden there.
- Filtering and export handle at most the first 1000 records; a warning is shown when the recordset is larger.
- Import does not fill one2many or read-only columns; they are reported as ignored.
- Tables displayed with a specialized widget (e.g. sale order lines) are left untouched by default; the setup form warns you and offers an explicit override switch.
Support
Questions, bug reports or feature requests: meisanqo@outlook.com
Odoo Proprietary License v1.0 This software and associated files (the "Software") may only be used (executed, modified, executed after modifications) if you have purchased a valid license from the authors, typically via Odoo Apps, or if you have received a written agreement from the authors of the Software (see the COPYRIGHT file). You may develop Odoo modules that use the Software as a library (typically by depending on it, importing it and using its resources), but without copying any source code or material from the Software. You may distribute those modules under the license of your choice, provided that this license is compatible with the terms of the Odoo Proprietary License (For example: LGPL, MIT, or proprietary licenses similar to this one). It is forbidden to publish, distribute, sublicense, or sell copies of the Software or modified copies of the Software. The above copyright notice and this permission notice must be included in all copies or substantial portions of the Software. THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Please log in to comment on this module