summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAdrien Dieudonne <adr@odoo.com>2017-12-01 14:14:44 +0100
committerAdrien Dieudonne <adr@odoo.com>2017-12-01 15:36:33 +0100
commitdbb9338a95fb94b31fbdb7f1dd4e4d6251dbd740 (patch)
treee3e054e60bde04866e61d283cbaeb62d6914eb0c
parent5d7ad2b16cc3ef579a6657822b7c57b07fef4f52 (diff)
[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.
-rw-r--r--addons/web/static/src/js/chrome/search_filters.js4
1 files changed, 4 insertions, 0 deletions
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;
},