Skip to content
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

[IMP] hr_timesheet: portal sorting order when groupby date #165921

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chrisduvivier
Copy link

Description of the issue/feature this PR addresses:

This commit aims to fix the order of the timesheets in the portal view, when grouped by date with the sorting set by newest. It also fixes the pagination not working properly when the timesheets are grouped by date. With this commit, when grouped by date, the timesheets will be sorted by latest when the sorting is set to newest, and by oldest when the sorting is set to other fields (e.g. Employee, Project etc.)

Current behavior before PR:

Prior to this commit, when a user chose groupby date and sortby newest, on the protal view, the timesheets were returned by the oldest order. Additionally, the pagination was still reflecting data from the non-groupby timesheets, leading to a wrong number of pages shown when using the groupby date.

task-3770909


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

This commit aims to fix the order of the timesheets in the portal view,
when grouped by date with the sorting set by `newest. It also fixes the
pagination not working properly when the timesheets are grouped by date.
With this commit, when grouped by date, the timesheets will be sorted by
latest when the sorting is set to `newest`, and by oldest when the sorting
is set to other fields.

Prior to this commit, when a user chose groupby `date` and sortby `newest`,
on the protal view, the timesheets were returned by the oldest order.
Additionally, the pagination was not working properly, because of how the
timesheets were being aggregated.

task-3770909
@robodoo
Copy link
Contributor

robodoo commented May 17, 2024

@C3POdoo C3POdoo added the RD research & development, internal work label May 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
RD research & development, internal work
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants