[FIX] web : Fixed datetime filter search based on wrong hours
Reproduce :
(With timezone GMT+3)
- Create any record R1 with previous day's date and time after 21:00.
- Create any record R2 with today's date and time after 21:00.
- Create a filter to show all todays records (Date is between "<TODAY'S DATE> 00:00:00 and <TODAY'S DATE> 23:59:59".
Result :
Even though R1 is in yesterday's date, it will show in the list.
R2 will not show in this list.
Explanation :
This behaviour has been observed in several modules, for any timezone but UTC & only with custom filters default datetime values.
The search was applied on [datetime(UTC) + 2 * offset] because the timezone wasn't correctly set.
Solution :
Timezone is now correctly set on default datetime values.
closes odoo/odoo#75663
Signed-off-by:
Nicolas Lempereur (nle) <nle@odoo.com>
Showing
Please register or sign in to comment