[16.0][IMP] web_timeline - support multiple group-by levels and allow to group by m2m field#3006
Conversation
|
Hi @tarteo, |
5a5f65b to
8cf395a
Compare
|
Can you please put an screenshot of the feature? |
|
@pedrobaeza I have included a screenshot of the feature in the PR description. |
|
Great improvement! |
7e7bc6e to
e34aeec
Compare
tarteo
left a comment
There was a problem hiding this comment.
Awesome!
I get an error when I quickly add and remove a group (by double clicking). However if I click normally I don't get an error. There's probably a race condition somewhere
Error (I have assets debugging enabled):
UncaughtPromiseError > TypeError Uncaught Promise > Cannot read properties of undefined (reading 'relation') TypeError: Cannot read properties of undefined (reading 'relation') at Class.split_groups (http://localhost:8069/web/assets/debug/web.assets_backend.js:190546:71) (/web_timeline/static/src/js/timeline_renderer.js:509)
8279013 to
0a27fb8
Compare
|
@tarteo I cannot reproduce your issue, but I found another related defect and fixed it (error when clicking on the group when group by non-relation field). Could you please help to check again? Thanks. And other things had been done (inthe description). |
|
For non-technical who wish to test this feature, you can use the XML view arch below to create a timeline view for the project model and modify the project window action to include the timeline view mode for testing. <timeline date_start="date_start" date_stop="date" string="Projects" default_group_by="user_id,partner_id,privacy_visibility" mode="week" event_open_popup="true" stack="true">
<field name="user_id"/>
<field name="privacy_visibility"/>
<field name="tag_ids"/>
<field name="name"/>
<templates>
<t t-name="timeline-item">
<div t-att-title="record.name">
<small>
<div>
<span>
<t t-esc="record.name"/>
</span>
</div>
<div>
PM:
<span>
<t t-esc="record.user_id[1]"/>
</span>
</div>
</small>
</div>
</t>
</templates>
</timeline> |
|
We added on the scheduled actions the timeline view as demo data for demonstration purposes without requiring extra modules. Maybe you can modify that demo view to showcase this feature. |
0a27fb8 to
f7b6591
Compare
I missed that. Thanks. |
|
Awesome @cuongnmtm. It would be great to update the version of the addon. |
No, that's done on merge by the bot, when we issue the command. |
f7b6591 to
0bb5942
Compare
|
This is nice new feature. |
|
Hi @hitrosol , I will check if it is easy to do (if the arrow and the label are in the same element, it will be annoying to implement the change as we need to split them). |
|
BTW, I think a toggle for the stack option is nice to have as well. Right now, the timeline needs to be either stack or no-stack. |
0bb5942 to
3c80193
Compare
@hitrosol I addressed this issue by changing the event trigger from a single "click" to a "double-click", thereby enhancing the user experience slightly. |
carlos-lopez-tecnativa
left a comment
There was a problem hiding this comment.
Great feature, thanks.
I remember testing a similar feature in this PR: #2929, but this one looks better with support for multi-level grouping.
I'm leaving the results of my functional testing below. Please let me know if you need any additional information.
|
@cuongnmtm, would you please make the runboat available so I can try it again ? |
352d766 to
a727e70
Compare
|
Hi @hitrosol , the new runboat is sailing. I also took the opportunity to improve the behavior when grouping by date and datetime fields, as noted by carlos-lopez-tecnativa above. |
a727e70 to
3c05eb7
Compare
…r|quarter|month|week|day
…ully settled to avoid errors when collapsing groups
3c05eb7 to
657adee
Compare
|
This PR has the |
|
/ocabot merge major Can you forward port it to upper versions? |
|
Hey, thanks for contributing! Proceeding to merge this for you. |
|
Congratulations, your PR was merged at 1e0ad4a. Thanks a lot for contributing to OCA. ❤️ |
|
Thank you all. I will work on forward-porting this to the newer versions. |

Allowing to add multiple group-by levels
Test cases: