Thomas Lefebvre (thle) bfbf92d4f5 [FIX] hr_holidays: correct iso format sent to the frontend
Steps to reproduce:
-------------------
- go to Time Off / Configuration / Public Holidays;
- create a public holiday (for one day):
	start = 00:00:00
	end = 23:59:59
- go to Time Off dashboard.

Issue:
------
The description of this public holiday is not correct.
The display shows that the public holiday is two days instead of one.

Cause:
------
When recording a public holiday, dates are saved in UTC.
Depending on the offset (UTC offset), this can change the day.

When we send the date in iso format to the frontend,
we modify the hours, but not the day.

Solution:
---------
Apply the employee's timezone to the datetime object
before sending it to the frontend.

Note:
-----
The correction is on the server side,
as we use the `combine` method of the datetime object
before sending the result to the frontend.
Indeed, we modify the times and lose the information
needed to apply the timezone afterwards.

opw-3381894

closes odoo/odoo#126983

X-original-commit: 1268502b813d9b9173edb3851faef965df6be6fe
Signed-off-by: Kevin Baptiste <kba@odoo.com>
Signed-off-by: Thomas Lefebvre (thle) <thle@odoo.com>
2023-06-30 20:13:40 +02:00
…
2023-06-27 10:42:56 +02:00
2023-06-30 10:42:16 +02:00
…
…
…
…
…
…

Build Status Tech Doc Help Nightly Builds

Odoo

Odoo is a suite of web based open source business apps.

The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...

Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.

Getting started with Odoo

For a standard installation please follow the Setup instructions from the documentation.

To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials

S
Description
No description provided
Readme LGPL-3.0
3.4 GiB
Languages
Python 49.6%
JavaScript 47.8%
SCSS 2%
CSS 0.3%
HTML 0.2%