-
- Downloads
[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: 096fdc7d Signed-off-by:Nicolas Lempereur (nle) <nle@odoo.com> Co-authored-by:
Jason Van Malder <jvm@odoo.com>
Showing
- addons/web/static/src/js/views/control_panel/control_panel_model.js 9 additions, 5 deletions.../static/src/js/views/control_panel/control_panel_model.js
- addons/web/static/src/js/views/control_panel/control_panel_view.js 24 additions, 16 deletions...b/static/src/js/views/control_panel/control_panel_view.js
- addons/web/static/tests/views/search_view_tests.js 40 additions, 1 deletionaddons/web/static/tests/views/search_view_tests.js
Loading
Please register or sign in to comment