| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 147 |
| Technical Name |
cml_web_list_resize |
| License | LGPL-3 |
| Website | https://kaypi.pe |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 147 |
| Technical Name |
cml_web_list_resize |
| License | LGPL-3 |
| Website | https://kaypi.pe |
cml_web_list_resize solves a common frustration in Odoo 17: column widths that you carefully resize are lost every time you navigate away. This module persists each user's column widths in localStorage, scoped per model and view, and restores them automatically on every visit — with zero configuration.
- ✅ Automatic persistence — widths are saved after every drag resize with no extra steps
- ✅ Per user & per view — each user has their own widths, scoped by model and view ID
- ✅ Instant restore — saved widths are applied on mount before the first render completes
- ✅ Native drag handle — uses Odoo's existing resize handle, no new UI elements added
- ✅ Embedded list safe — One2many and Many2many embedded lists are skipped to avoid conflicts
- ✅ No backend model — purely client-side, no database tables, no server requests
- ✔ Community
-
✔
Enterprise
On-premises - ✔ Odoo.sh
- ✘ Online
Native Odoo resets column widths every time you navigate away. cml_web_list_resize makes your resize choices permanent — saved instantly, restored automatically, with no setup required.
💾 Persistent by default
Every resize is automatically saved after a 600ms debounce. There is no button to click, no setting to enable — widths are stored the moment you release the handle.
👥 Per-user isolation
Each user's browser stores only their own widths. Resizing in one session does not affect other users — everyone keeps their personal layout.
🗂 Per-view scoping
Widths are saved per model and view ID. Contacts, Sales Orders and any other list each have their own independent set of widths — no cross-contamination.
⚡ Zero configuration
Install and forget. No settings to configure, no groups to assign, no backend records to create. The module works transparently on every list view from day one.
🛡 No backend footprint
Purely client-side. No new Python models, no database tables, no server requests. All storage and retrieval is done via localStorage — the server never knows.
🔗 Native handle, no new UI
The module hooks into Odoo's existing resize handle — the same thin bar that already appears on column header hover. No new buttons, no toolbar changes, no UI clutter.
Watch the full flow — resize columns, navigate between pages and see widths preserved automatically.
1. Overview
Odoo 17 allows users to resize list columns by dragging the resize handle on each column header. However, those widths are lost the moment you navigate away — every return to the list resets all columns to their default sizes.
cml_web_list_resize patches the native
ListRenderer to save column widths in
localStorage after each resize and restore them
automatically on the next visit. No configuration, no server calls,
no extra UI — it just works.
How it works
- Drag any column resize handle to set your preferred width.
- Release the handle — widths are saved automatically (600ms debounce).
- Navigate away and come back — widths are restored instantly.
- Repeat for any list view — each one has its own saved widths.
2. How to Resize
Column resizing uses the native Odoo resize handle — the thin vertical bar that appears on the right edge of each column header on hover. No new UI is added by this module.
Steps
- Hover over a column header — the resize handle appears on its right edge as a thin highlighted bar.
- Click and drag the handle left or right to resize the column.
- Release to confirm — the module captures the final width and schedules a save.
- The width is stored in localStorage within 600ms after release.
3. Persistence
Widths are stored in the browser's localStorage — a client-side key/value store that survives page reloads and browser restarts without sending anything to the server.
- Storage key format:
cml_resize.{model}.{viewId}— one entry per list view. - Value: a JSON object mapping each column's field name to its width in pixels.
- Restore: on every mount and after each re-render
where
keepColumnWidthsis not already set. - No server requests: the module adds zero RPC calls — all I/O is local.
4. Scope & Isolation
Each list view has its own isolated set of saved widths. Resizing columns in one view never affects another.
- Per model: Contacts and Sales Orders have separate width sets.
- Per view ID: if the same model has multiple list views (e.g. a kanban-embedded list vs. the main list), each gets its own entry.
- Per user: localStorage is browser-level — each user's browser stores only their own widths.
- Embedded lists skipped: One2many and Many2many lists inside form views are excluded — only top-level list views persist widths.
5. Reset Widths
To clear saved widths and return a list to its default column sizes, call the reset method from the browser console on the active list view component.
Reset from console
Open the browser DevTools console while on the list view and run:
// Find the ListRenderer component and call reset
owl.__apps__[0].env.services.ui.activeElement
.querySelector('.o_list_renderer').__owl__
.component.cmlResizeReset()
cml_resize.{model}.{viewId}
then reload the page.
Installation steps
- Place
cml_web_list_resizein your custom addons path. - Update Apps List from the Apps menu.
- Install List View Column Resize.
- To upgrade after an update:
./odoo-bin -c your_odoo.conf -d your_database -u cml_web_list_resize --stop-after-init
❓ Are widths shared between users?
No. localStorage is per browser — each user's browser stores only their own widths. User A's resizing does not affect User B.
❓ What happens if I clear browser data?
Saved widths are lost and columns revert to Odoo's default sizes on next visit. Simply resize again to restore your preferred layout.
❓ Does it conflict with other list view modules?
The module patches onStartResize and
freezeColumnWidths via Odoo's standard patch system. It is
compatible with other CML list modules and should not conflict with well-written
third-party patches.
❓ Does it work on mobile or tablet?
The module uses the native pointer events that Odoo already uses for resizing. Persistence works on any device that supports localStorage, but the resize interaction itself depends on Odoo's native behavior on that device.
❓ Does it send any data to the server?
No. All storage and retrieval is done via localStorage only. The module adds zero server requests, zero new models and zero database tables.
Need Help?
Contact us for technical support, bug reports or feature requests related to column width persistence.
Contact Support⏰ Response time: 24–48 business hours
⭐ If this module helps your team, please leave a review on Odoo Apps ⭐
Please log in to comment on this module