From dbb9338a95fb94b31fbdb7f1dd4e4d6251dbd740 Mon Sep 17 00:00:00 2001 From: Adrien Dieudonne Date: Fri, 1 Dec 2017 14:14:44 +0100 Subject: [PATCH] [FIX] web: search_filters: avoid to apply UTC offset for date fields Due to a previous commit (@d2e1a1de), if a date was selected in search filter, the time was converted to UTC to the server. For negative offset, the search was then executed for the day before. Now, we avoid to convert the searched date to UTC. We only need to convert datetime fields. --- addons/web/static/src/js/chrome/search_filters.js | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/addons/web/static/src/js/chrome/search_filters.js b/addons/web/static/src/js/chrome/search_filters.js index e2f57fd8f87..0d4baac8217 100644 --- a/addons/web/static/src/js/chrome/search_filters.js +++ b/addons/web/static/src/js/chrome/search_filters.js @@ -248,6 +248,10 @@ ExtendedSearchProposition.Date = ExtendedSearchProposition.DateTime.extend({ attributes: { type: 'date' }, + get_value: function (index) { + // retrieve the datepicker value + return this["datewidget_" + (index || 0)].getValue(); + }, _get_widget_class: function () { return datepicker.DateWidget; },