diff --git a/addons/base/static/src/js/search.js b/addons/base/static/src/js/search.js index ce3113532cc..ddb98debd15 100644 --- a/addons/base/static/src/js/search.js +++ b/addons/base/static/src/js/search.js @@ -439,19 +439,14 @@ openerp.base.search.ExtendedSearchGroup = openerp.base.BaseWidget.extend({ openerp.base.search.extended_filters_types = { char: { - operators: [ - {value: "ilike", text: "contains"}, - {value: "not ilike", text: "doesn't contain"}, - {value: "=", text: "is equal to"}, - {value: "!=", text: "is not equal to"}, - {value: ">", text: "greater than"}, - {value: "<", text: "less than"}, - {value: ">=", text: "greater or equal than"}, - {value: "<=", text: "less or equal than"}, - ], build_component: function(parent) { return new openerp.base.search.ExtendedSearchProposition.Char(parent); } + }, + datetime: { + build_component: function (parent) { + return new openerp.base.search.ExtendedSearchProposition.DateTime(parent); + } } }; @@ -504,14 +499,16 @@ openerp.base.search.ExtendedSearchProposition = openerp.base.BaseWidget.extend({ var type = field.type; var extended_filters_types = openerp.base.search.extended_filters_types; type = type in extended_filters_types ? type : "char"; - _.each(extended_filters_types[type].operators, function(operator) { + + this.value_component = extended_filters_types[type].build_component(this); + + _.each(this.value_component.operators, function(operator) { var option = jQuery('