Skip to content

[FP][17.0][IMP] web_timeline - support multiple group-by levels and allow to group by m2m field#3301

Merged
OCA-git-bot merged 3 commits intoOCA:17.0from
komit-consulting:web_timeline-multi-group-by-fp-17
Mar 27, 2026
Merged

[FP][17.0][IMP] web_timeline - support multiple group-by levels and allow to group by m2m field#3301
OCA-git-bot merged 3 commits intoOCA:17.0from
komit-consulting:web_timeline-multi-group-by-fp-17

Conversation

@cuongnmtm
Copy link
Copy Markdown
Contributor

@cuongnmtm cuongnmtm commented Oct 2, 2025

Forward-port of #3006

Test cases:

  • group by one field (group by m2o, selection, integer, m2m, date, ...)
  • group by multiple fields
  • group by 0 field: back to default group by
  • create a new record
  • drag and drop record to update
  • click on the group by to view the group by record detail
  • when group by m2m field, record is displayed multiple times if linked to multiple m2m records
  • when drag and drop, the value of the m2m field should not be updated as there is no best way to handle this
  • when creating a new record, set the default value for all grouped fields
    • m2m field value will also be set, starting from 17.0
  • handle group by non-relation fields: click on the group of selection or char field do not popup record form view to avoid error.
  • dependency_arrow between multiple collapse/expand groups
  • group by create_date year|month|day, try colapse the group by (year) in both project and task timelines

@OCA-git-bot
Copy link
Copy Markdown
Contributor

Hi @tarteo,
some modules you are maintaining are being modified, check this out!

@pedrobaeza pedrobaeza added this to the 17.0 milestone Oct 2, 2025
@carlos-lopez-tecnativa
Copy link
Copy Markdown
Contributor

@cuongnmtm I understand this PR is not ready for review yet because the files are not loaded in the manifest.
Additionally, you must convert them to .esm.js and odoo-module according to this commit made during the migration to 17.0: 4334129

@cuongnmtm cuongnmtm force-pushed the web_timeline-multi-group-by-fp-17 branch from 67df4c0 to 62b9a52 Compare October 5, 2025 16:53
Copy link
Copy Markdown
Contributor

@carlos-lopez-tecnativa carlos-lopez-tecnativa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I got this error when grouping a datetime field. I suspect this commit 751fb9c might be missing, please review:

image

@cuongnmtm
Copy link
Copy Markdown
Contributor Author

I got this error when grouping a datetime field. I suspect this commit 751fb9c might be missing, please review:

image

I haven't finished this port yet. There are three commits to port, and the remaining two are taking more time because I need to adapt the changes to the refactoring in version 17. I will find time to work on them.

@pedrobaeza
Copy link
Copy Markdown
Member

@cuongnmtm any news on this fw-port?

@cuongnmtm
Copy link
Copy Markdown
Contributor Author

@cuongnmtm any news on this fw-port?

@pedrobaeza Thank you for checking this. I have reviewed it and believe it will take several hours to complete, as porting this change involves significant effort due to the major refactoring in 17.0.

I am currently quite busy with the Komit's customer projects, but I will aim to continue working on this every Friday.

@pedrobaeza
Copy link
Copy Markdown
Member

Thanks for the follow-up. We will wait for news.

@cuongnmtm
Copy link
Copy Markdown
Contributor Author

cuongnmtm commented Mar 13, 2026

It is done, could you please help review again @pedrobaeza @carlos-lopez-tecnativa ? Thanks.

@cuongnmtm cuongnmtm changed the title [FP][17.0][WIP] [IMP] web_timeline - support multiple group-by levels and allow to group by m2m field [FP][17.0][IMP] web_timeline - support multiple group-by levels and allow to group by m2m field Mar 13, 2026
Copy link
Copy Markdown
Member

@pedrobaeza pedrobaeza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested on runboat and working properly. Thanks!

Copy link
Copy Markdown
Contributor

@carlos-lopez-tecnativa carlos-lopez-tecnativa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have the same issue reported in V16 #3006 (review)

I tested locally with the project_timeline module installed. In the All Tasks view, when grouping by creation date (by year and month), collapsing the group by year triggers a traceback.
Image

@cuongnmtm cuongnmtm force-pushed the web_timeline-multi-group-by-fp-17 branch from b8635f1 to cd420fd Compare March 20, 2026 09:10
@cuongnmtm cuongnmtm force-pushed the web_timeline-multi-group-by-fp-17 branch from cd420fd to ccb3e06 Compare March 20, 2026 09:16
Copy link
Copy Markdown
Contributor

@carlos-lopez-tecnativa carlos-lopez-tecnativa left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work, LGTM. Just a minor comment: I think you should update the README, because now the group is opened with a double-click, but the README says it opens with a single click.
Image

@OCA-git-bot
Copy link
Copy Markdown
Contributor

This PR has the approved label and has been created more than 5 days ago. It should therefore be ready to merge by a maintainer (or a PSC member if the concerned addon has no declared maintainer). 🤖

…arter|month|week|day

Port of 16.0 commit 751fb9c to 17.0 refactored codebase:
- Convert group IDs from string format to JSON segment objects
- Add _getGroupedDate() for date/datetime grouping with Luxon
- Transform date fields after search_read for :operator specifiers
- Handle selection fields to display labels instead of technical values
- Remove fieldsGet dependency, use model.fields directly
- Add M2M name caching in split_groups
- Update controller group parsing (click, move, add) for JSON format
When creating a new record from a m2m group row, pre-fill the m2m field
with the group's value using the [(6, 0, [id])] command format.
@cuongnmtm cuongnmtm force-pushed the web_timeline-multi-group-by-fp-17 branch from ccb3e06 to c1fafa6 Compare March 27, 2026 08:32
@cuongnmtm
Copy link
Copy Markdown
Contributor Author

Nice work, LGTM. Just a minor comment: I think you should update the README, because now the group is opened with a double-click, but the README says it opens with a single click. Image

I updated the README. Thank you.

@pedrobaeza
Copy link
Copy Markdown
Member

Thank you very much for the efforts!

/ocabot merge minor

Are you going to fw-port it to 18?

@OCA-git-bot
Copy link
Copy Markdown
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 17.0-ocabot-merge-pr-3301-by-pedrobaeza-bump-minor, awaiting test results.

@cuongnmtm
Copy link
Copy Markdown
Contributor Author

Thank you very much for the efforts!

/ocabot merge minor

Are you going to fw-port it to 18?

Yes sir, I am going to initialize the fw. Hopefully, it is easier forwarding to 18.0 and 19.0.

@OCA-git-bot
Copy link
Copy Markdown
Contributor

Congratulations, your PR was merged at b0288b6. Thanks a lot for contributing to OCA. ❤️

@OCA-git-bot OCA-git-bot merged commit 1757133 into OCA:17.0 Mar 27, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants