summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/fields/basic_fields.js
diff options
context:
space:
mode:
authorMathieu Duckerts-Antoine <dam@odoo.com>2020-01-28 11:42:59 +0000
committerMathieu Duckerts-Antoine <dam@odoo.com>2020-02-03 13:57:17 +0000
commit95f40530f344df3f38d67e5c092b0862e866c5e9 (patch)
treeef0973c16acd413129634ad7d83b4ae1680bee96 /addons/web/static/src/js/fields/basic_fields.js
parent68f5883aff595d1c9ac3e928b7d3bbedd09868dd (diff)
[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>
Diffstat (limited to 'addons/web/static/src/js/fields/basic_fields.js')
0 files changed, 0 insertions, 0 deletions