summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Monjoie <dmo@odoo.com>2017-04-12 08:39:53 +0200
committerDavid Monjoie <dmo@odoo.com>2017-04-21 13:25:35 +0200
commit2d251a6c280fea285fd28aa3d20be2da3f43fdaa (patch)
tree1f9492e4156fb6f24d365948509153b9b9c413c1
parentc9c05e54e52c653090527b1b270e1fa6d9fbf686 (diff)
[FIX] web: use momentjs for default filter value
The format methods of the date/datetime type expect a momentjs date so it can call its 'format' method. Since we were not giving it a momentjs date, the call to 'format' was crashing.
-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 09df223a9bf..e45b5ec6b0e 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(new Date());
+ this[name].set_value(moment(new Date()));
}).bind(this));
},
_get_widget_class: function () {