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

[FW][FIX] hr_holidays: correct the timezone for Public Time Off #122748

Conversation

fw-bot
Copy link
Contributor

@fw-bot fw-bot commented May 26, 2023

When we create a public time off,
we save the start date and the end date in utc.
Unfortunately, to calculate the utc, we don't use
the calendar timezone linked to these public time off.

Issue:
For example, with the "timesheet_grid" module,
the timesheets created for these time offs
will not be correct for employees who have a calendar in a different timezone than the user who creates the public time off.

Solution:
Convert the dates received in the calendar timezone.

opw-3302925

Forward-Port-Of: #121171

When we create a public time off,
we save the start date and the end date in utc.
Unfortunately, to calculate the utc, we don't use
the calendar timezone linked to these public time off.

Issue:
For example, with the "timesheet_grid" module,
the timesheets created for these time offs
will not be correct for employees who have a calendar
in a different timezone than the user who creates the public time off.

Solution:
Convert the dates received in the calendar timezone.

opw-3302925

X-original-commit: 63688d3
@robodoo
Copy link
Contributor

robodoo commented May 26, 2023

@fw-bot
Copy link
Contributor Author

fw-bot commented May 26, 2023

This PR targets saas-16.3 and is part of the forward-port chain. Further PRs will be created up to master.

More info at https://github.com/odoo/odoo/wiki/Mergebot#forward-port

@robodoo robodoo added the forwardport This PR was created by @fw-bot label May 26, 2023
@C3POdoo C3POdoo added the OE the report is linked to a support ticket (opw-...) label May 26, 2023
@robodoo
Copy link
Contributor

robodoo commented May 30, 2023

@thle-odoo @tivisse staging failed: ci/l10n on aa0cd9b1dd70ce1bd939288fbb7d44dc23abed17 (view more at https://runbot.odoo.com/runbot/build/41355837)

@tivisse
Copy link
Contributor

tivisse commented May 30, 2023

@robodoo retry

robodoo pushed a commit that referenced this pull request May 31, 2023
When we create a public time off,
we save the start date and the end date in utc.
Unfortunately, to calculate the utc, we don't use
the calendar timezone linked to these public time off.

Issue:
For example, with the "timesheet_grid" module,
the timesheets created for these time offs
will not be correct for employees who have a calendar
in a different timezone than the user who creates the public time off.

Solution:
Convert the dates received in the calendar timezone.

opw-3302925

closes #122748

X-original-commit: 63688d3
Signed-off-by: Yannick Tivisse (yti) <yti@odoo.com>
Signed-off-by: Lefebvre Thomas (thle) <thle@odoo.com>
@robodoo robodoo temporarily deployed to merge May 31, 2023 02:02 Inactive
@robodoo robodoo closed this May 31, 2023
@tivisse tivisse deleted the saas-16.3-16.0-opw-3302925-time_off_working_times_issue-thle-Xb1S-fw branch May 31, 2023 08:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
forwardport This PR was created by @fw-bot OE the report is linked to a support ticket (opw-...)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants