-
-
Notifications
You must be signed in to change notification settings - Fork 2k
17.0 quick group by #3288
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: 17.0
Are you sure you want to change the base?
17.0 quick group by #3288
Conversation
Add toggleable group-by button into List view so users can group by a column directly from the list header. Keeps compatibility with existing ListRenderer behaviour and avoids grouping by relational / non-stored fields. - Validate field type and storeable property before grouping - Update UI state (icons, styles) after model reload - Remove debug output before merge Co-authored-by: MD Jafor Sadek Khan [email protected]
Add toggleable group-by button into List view so users can group by a column directly from the list header. Keeps compatibility with existing ListRenderer behaviour and avoids grouping by relational / non-stored fields. - Validate field type and storeable property before grouping - Update UI state (icons, styles) after model reload - Remove debug output before merge Co-authored-by: MD Jafor Sadek Khan [email protected]
Add toggleable group-by button into List view so users can group by a column directly from the list header. Keeps compatibility with existing ListRenderer behaviour and avoids grouping by relational / non-stored fields. - Validate field type and storeable property before grouping - Update UI state (icons, styles) after model reload - Remove debug output before merge Co-authored-by: MD Jafor Sadek Khan [email protected]
Add toggleable group-by button into List view so users can group by a column directly from the list header. Keeps compatibility with existing ListRenderer behaviour and avoids grouping by relational / non-stored fields. - Validate field type and storeable property before grouping - Update UI state (icons, styles) after model reload - Remove debug output before merge Co-authored-by: MD Jafor Sadek Khan [email protected]
Add toggleable group-by button into List view so users can group by a column directly from the list header. Keeps compatibility with existing ListRenderer behaviour and avoids grouping by relational / non-stored fields. - Validate field type and storeable property before grouping - Update UI state (icons, styles) after model reload - Remove debug output before merge Co-authored-by: MD Jafor Sadek Khan [email protected]
Add toggleable group-by button into List view so users can group by a column directly from the list header. Keeps compatibility with existing ListRenderer behaviour and avoids grouping by relational / non-stored fields. - Validate field type and storeable property before grouping - Update UI state (icons, styles) after model reload - Remove debug output before merge Co-authored-by: MD Jafor Sadek Khan [email protected]
Hi @MD-Jafor-Sadek-Khan. Thanks for sharing.
regards. |
…nality - Ensured README fragment files (, , etc.) are present and correctly formatted. - Verified module on Runboat; group-by toggle button now appears as expected. - Added screenshot reference for reviewers.
…nality - Ensured README fragment files (, , etc.) are present and correctly formatted. - Verified module on Runboat; group-by toggle button now appears as expected. - Added screenshot reference for reviewers.
Hi @legalsylvain , Thanks for your feedback. I’ve verified the module according to OCA guidelines regarding README fragment files. The readme fragments are included under the readme/ folder and are automatically processed to generate the main README.rst and documentation. I’ve also tested the module on Runboat, and the group-by toggle button appears correctly in list views (e.g., Contacts, Sales, Inventory) for groupable columns. Please see the attached screenshot for reference. Note that in a small number of list views (e.g., Invoice, Bills, Credit Notes, Refunds), the button may not appear due to templates being replaced in the Odoo community code. Let me know if any additional adjustments are needed. Regards, ![]() ![]() |
Purpose
Add a compact, toggleable group-by button to list/tree view column headers so users can quickly group by a single field from the header.
Technical summary
web.views.list.ListRenderer
to add:isColumnGroupable(column)
— checks field metadata and excludesone2many
,many2many
, and non-stored computed fields.isColumnCurrentlyGrouped(column)
— detects if the list is currently grouped bycolumn.name
(single-level grouping).getButtonStyle(column)
— returns inline style string for the header button.onGroupByColumn(ev)
— toggles grouping by the clicked field, triggersmodel.load({ groupBy })
, and updates header button UI (icons, colors, brief scale animation, hover styles).Files touched
static/src/js/list_header_cell.js
— JS patch toListRenderer
.static/src/xml/list_header_cell.xml
— QWeb template injecting the header button.__manifest__.py
— module metadata and assets bundle registration.Checklist
console.log
/console.warn
in committed code.Manual testing steps
one2many
,many2many
) and known non-stored computed fields do not show the button.Notes for reviewers
[]
and[field]
).model.root.groupBy
changes after a simulated click.Limitations / design decisions
model.load
is performed via a shortsetTimeout
to synchronize with the renderer lifecycle; if maintainers prefer, this can be refactored to a more robust event-hook approach.Related issues / PRs