summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorAaron Bohy <aab@odoo.com>2017-06-01 08:32:56 +0200
committerAaron Bohy <aab@odoo.com>2017-06-01 12:02:17 +0200
commit2a4a011256f9f0d44546c6082ec1ccf4450bff52 (patch)
tree3277df574b2da2745aab7b0ea6d24395920da285 /addons/web/static/src
parentd24ea500e6ecfdd6c3d7b10d84367d1f4b4945f9 (diff)
[FIX] web: SearchView: add custom filter on datetime field
Function 'set_value' of datepicker had been renamed to 'setValue' by commit 5f13b7f. There were still a call to that function that needed to be adapted in the search filters, so it crashed when trying to add a custom filter on a datetime field. It would be nice to add a test for this, but the code of the SearchView cannot be easily tested yet.
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/chrome/search_filters.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/web/static/src/js/chrome/search_filters.js b/addons/web/static/src/js/chrome/search_filters.js
index e45b5ec6b0e..69c38056e4a 100644
--- a/addons/web/static/src/js/chrome/search_filters.js
+++ b/addons/web/static/src/js/chrome/search_filters.js
@@ -232,7 +232,7 @@ ExtendedSearchProposition.DateTime = ExtendedSearchProposition.Field.extend({
_create_new_widget: function (name) {
this[name] = new (this._get_widget_class())(this);
return this[name].appendTo(this.$el).then((function () {
- this[name].set_value(moment(new Date()));
+ this[name].setValue(moment(new Date()));
}).bind(this));
},
_get_widget_class: function () {