Files
odoo_source/addons/web/static/tests
Mathieu Duckerts-AntoineandJason Van Malder 95f40530f3 [FIX] web: fix date filters
Issue

    If month - 1 or month - 2 are in the previous year, the filter is
    incorrect.

    ex: Date = Jan. 2020, Filter = Dec. 2019
        => last_year__last_month = 2018-12 instead 2019-12

Cause

    If date is 2020-01-20

    Selecting December => adding param "last_month"
    Selecting 2019 => adding param "last_year"

    Applying "last_month" => date become 2019-12-01
    Applying "last_year" => date become 2018-12-01

Solution

    Detect the right year to activate by default
    when a month is selected and no year is selected.
    With that solution it is not possible to get records in Jan. 2020
    or in Dec. 2019 only for instance but the global functioning
    of date filters stays the same as before.

OPW-2169528

closes odoo/odoo#44208

X-original-commit: 096fdc7d3fe0799aa761c6ad3597569a002c698e
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Co-authored-by: Jason Van Malder <jvm@odoo.com>
2020-02-03 13:57:17 +00:00
..
2020-01-06 14:37:16 +00:00
2020-02-03 13:57:17 +00:00