Daily updates from Odoo
Wednesday, November 6, 2024
2 changes · 17.0
Resolved issues and error corrections
This update resolves an issue where Helpdesk teams weren't displaying all relevant non-billable projects in their dropdown menus. The fix ensures that projects are correctly identified regardless of billing settings, and also corrects a bug where disabling Time Billing kept projects in an unexpected state. This improves team efficiency and data accuracy.
Original PR description
### Current behavior before PR: When creating a Helpdesk team and the Timesheets option enabled and Time Billing disabled you will not get all non-billed projects in the dropdown menu. This is…
### Current behavior before PR: When creating a Helpdesk team and the Timesheets option enabled and Time Billing disabled you will not get all non-billed projects in the dropdown menu. This is happening because the domain for project_id is checking the company_id to be the same as the company_id of the team. https://github.com/odoo/enterprise/blob/18.0/helpdesk_sale_timesheet/models/helpdesk_team.py#L10 Though since this commit https://github.com/odoo-dev/odoo/commit/16a07ed1bfd33a193b363f3e87aab3f9bd6f8bd0 company_id is not required for projects. Since the domain of the project_id field was introduced here https://github.com/odoo/enterprise/pull/4956/commits/c82b1b019cebd1f78749b9563e717fae88d7fae5 and the reason why we check the company_id is not the same anymore since the commit I mentioned above we should not use the same domain. Also in this PR we are solving another issue which is where you enable both Timesheets and Time Billing options and choose a project that has both options enabled too then you disable the Time Billing option for the team the project that we chose before will be kept and have both options enabled and you can save it. ### Desired behavior after PR is merged: We are now checking for the project of the team if the company_id is False or equal to the team's company_id. Also when disbaling the Time Billing option we set the project_id to False. opw-4275647 opw-4148207
This update resolves an issue where the 'Requests to switch' filter incorrectly identified future shifts as past, due to timezone discrepancies. The fix ensures shifts are accurately displayed based on their actual time, regardless of the user's location, improving scheduling accuracy.
Original PR description
The 'Requests to switch' filter is supposed to show slots that are unwanted and that are not in the past. Prior to this commit, some shifts that were in the future were not shown by the filter. That was because the planning.slot field end_datetime was encoded in UTC while the datetime.datetime.now() function in the filter's domain was returning the datetime in the client's timezone. Shifts in the time difference between the user's timezone and UTC would be mistakenly marked as "past shifts" while they might still be in the future. We fix this by using the 'to_utc()' function which should make the filter domain's comparisson between 2 UTC datetimes. Fix done in 17.0 task-4286161