Skip to content
Snippets Groups Projects
Commit d33e18e9 authored by Victor Piryns (pivi)'s avatar Victor Piryns (pivi)
Browse files

[FIX] web: don't apply tz on daterangepicker input field


Issue:
When opening the daterangepicker, but not modifying anything and
closing it, and then discarding the record, the timezone is
reapplied on the input. (value in DB is correct).

Steps to reproduce:
- Install an app that has a daterange field (ex: FSM in 14, Project
  for 15->saas-15.2)
- Edit the daterange, don't change anything, close it, discard the
  record.
- Observe the timezone has been reapplied on the input value.

Cause:
When opening the daterangepicker, the initial dates read from the
input field were already localized based on the tz, but the
daterangepicker object expect it to receive datetime in utc.

Fix:
Parse the input and make sure it's in utc.

Affected versions:
- 14.0
- 15.0
- saas-15.2

opw-3342274

closes odoo/odoo#130269

X-original-commit: 919beb75
Signed-off-by: default avatarBruno Boi (boi) <boi@odoo.com>
Signed-off-by: default avatarPiryns Victor (pivi) <pivi@odoo.com>
parent b9a1b180
Branches
Tags
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment