| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 356 |
| Technical Name |
cml_web_list_header_menu |
| License | LGPL-3 |
| Website | https://kaypi.pe |
| Availability |
Odoo Online
Odoo.sh
On Premise
|
| Lines of code | 356 |
| Technical Name |
cml_web_list_header_menu |
| License | LGPL-3 |
| Website | https://kaypi.pe |
cml_web_list_header_menu adds a contextual action menu directly on each column header of Odoo 17 list views. A single click on the column icon opens a compact dropdown with sort, group by, filter and remove actions — all wired to the native SearchModel so every action behaves exactly like its native Odoo counterpart.
- ✅ Sort Ascending / Descending — sort the list by any sortable column with a single click
- ✅ Reset Sort — remove active column sort and return to default ordering
- ✅ Group By / Remove Group By — group the list by the column field; the item switches to Remove when already active
- ✅ Filter / Edit Filter / Remove Filter — open Odoo's native Domain Selector; once active, edit or remove the filter directly from the menu
- ✅ Smart visibility — menu items appear only when the action is applicable to the field type and current state
- ✅ SearchModel sync — all actions integrate with native search, favorites and group by panel
- ✔ Community
-
✔
Enterprise
On-premises - ✔ Odoo.sh
- ✘ Online
Odoo's search bar is powerful but requires multiple clicks for simple operations. cml_web_list_header_menu puts sort, group and filter one click away — right on the column.
⚡ Instant column actions
Sort, group or filter any column with a single click — no need to open the search bar, expand dropdowns or remember field names. The action runs immediately and syncs with the native SearchModel.
🔄 Reversible group by and filters
Once a Group By or Filter is active, the menu item switches to Remove Group By or Edit / Remove Filter — so you can undo any action from the same place without hunting through the search bar chips.
🔍 Full domain editor on demand
The Filter action opens Odoo's native DomainSelectorDialog pre-set to the column field. Full operator support, sub-conditions and expressions — all from a single click on any column header.
🧠 Smart menu — no noise
Each menu only shows the actions that apply: Sort appears only for sortable fields, Group By only for stored fields in the search view, Filter only for stored fields. Inapplicable actions are hidden, not disabled.
🔗 Native SearchModel integration
Every action uses the same SearchModel APIs as native Odoo. Group by chips, filter chips and sort indicators all appear correctly in the search bar — fully compatible with Favorites and existing search conditions.
⚡ Zero-dependency install
Depends only on web. No extra Python libraries, no third-party JS bundles.
Works on Community, Enterprise on-premises and Odoo.sh.
Watch sort, group by, filter, edit and remove actions in action — all from the column header menu.
1. Overview
cml_web_list_header_menu injects a small action button inside each column header label. Clicking it opens a compact dropdown with contextual actions for that column: sort, reset sort, group by and filter. All actions use the native Odoo SearchModel so they behave exactly like their counterparts in the search bar.
Typical flow
- Open any list view — the action button appears inside each column label.
- Click the button on any column to open the contextual menu.
- Choose Sort, Group By or Filter — the list updates immediately.
- Open the menu again on the same column to edit or remove the active group / filter.
- Click outside or press Escape to close the menu.
2. Sort Ascending / Descending
Sort the list by any sortable column directly from the header menu. The active sort direction is reflected in the column header indicator just like native Odoo sorting.
- Sort Ascending — orders the list from lowest to highest (A→Z, 0→9, oldest→newest).
- Sort Descending — orders the list from highest to lowest (Z→A, 9→0, newest→oldest).
- Only shown for columns where the field supports sorting
(
store=True). - Replaces any previously active sort — consistent with Odoo native behavior.
3. Reset Sort
Remove the active column sort and return the list to its default ordering (usually creation date or sequence). Shown only when a sort is currently active on the list.
- Appears in the menu only when the list has an active sort.
- Restores the default
orderByconfigured in the view arch or model. - Does not affect active filters or group by — only sort is cleared.
4. Group By / Remove Group By
Group the list by the column field without opening the search bar. Once active, the menu item switches to Remove Group By so you can undo it with one click from the same place.
- Group By: Field — shown when no group by is active
for this column. Adds the grouping via
createNewGroupBy. - Remove Group By: Field — shown when a group by is active for this column. Removes the grouping and reloads the list.
- Shown only for stored fields that appear in the search view fields.
- Duplicate grouping by the same field is prevented automatically.
5. Filter / Edit Filter / Remove Filter
Open Odoo's native Domain Selector pre-set to the column field. Once a filter is active on a column, the menu offers two actions: edit the existing domain or remove the filter entirely.
- Filter: Field — opens the DomainSelectorDialog pre-set to the column. On confirm, creates a new filter in the SearchModel.
- Edit Filter: Field — reopens the dialog with the current domain so you can refine the condition.
- Remove Filter: Field — removes the active filter from the SearchModel and reloads the list.
- Shown only for stored fields that support domain filtering.
6. Smart Visibility
The menu only shows the actions that actually apply to each column and its current state. Inapplicable actions are hidden to keep the menu clean and avoid confusion.
Visibility rules
- Sort Asc / Desc — shown only when
isSortable(column)is true. - Reset Sort — shown only when the list has an active sort on this column.
- Group By — shown for stored fields in the search view, when no group by is active for this field.
- Remove Group By — shown instead of Group By when a group by created from this menu is active.
- Filter — shown for stored fields, when no filter is active for this field.
- Edit / Remove Filter — shown instead of Filter when a filter created from this menu is active.
- No menu — columns without label, computed fields without store, or handle/button columns get no menu button at all.
Installation steps
- Place
cml_web_list_header_menuin your custom addons path. - Update Apps List from the Apps menu.
- Install List View Column Header Menu.
- To upgrade after an update:
./odoo-bin -c your_odoo.conf -d your_database -u cml_web_list_header_menu --stop-after-init
❓ Does this conflict with native column sorting?
No. The menu uses the same sort API as native Odoo. Clicking the column label still toggles sort as usual — the menu gives you explicit direction control.
❓ Can I group by multiple columns?
Yes. Each column adds its group by independently. You can build multi-level hierarchies by clicking Group By on different columns without leaving the list.
❓ What happens with computed or non-stored fields?
Sort and Filter are hidden for those columns. Group By is only shown for fields that appear in the search view definition.
❓ Does it work inside embedded lists (One2many)?
Sort works in embedded lists. Group By and Filter require a SearchModel and are only shown in top-level list views where the SearchModel is available.
❓ Can I edit a filter after creating it?
Yes. Once a filter is active, the menu shows Edit Filter which reopens the Domain Selector with the current domain. Confirming replaces the existing filter condition without creating a new one.
Need Help?
Contact us for technical support, bug reports, feature requests, or help adapting the column header menu to your team workflow.
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