Thomas Lefebvre (thle) 34ed6e2266 [FIX] hr_holidays: apply timezone to leave statistics
Context:
    In some companies, we want to give employees a day off.
    Unfortunately, their working hours do not correspond to those of the company.
    To remedy this, we set the work hours at: 00:00 until 23:59.

Steps to reproduce:
    - set work hours to 00:00 until 23h59;
    - give one day off to a department;
    - view statistics on a employee (who belongs to the department).

Issue:
    We notice that in the statistics, the dates are wrong.
   Indeed, it is indicated that the leave is over two days.

Cause:
    When we receive the dates via the rpc call to display them, they are character strings.
    The browser interprets them with the computer's timezone (even if it is UTC).
    The hours of work being at the limit of the day, we overflow on a second day.

Solution:
    As we know that the timezone used to store dates in the database is UTC, we can calculate an offset and apply it before displaying the result.

opw-3063177

closes odoo/odoo#107614

X-original-commit: 31dda867957c8083177f7e2776fa461786c2bff3
Signed-off-by: Kevin Baptiste <kba@odoo.com>
2022-12-09 14:08:07 +01:00
2022-10-06 14:56:52 +02:00
2022-12-08 08:48:48 +01: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%