diff --git a/addons/web/static/src/js/search.js b/addons/web/static/src/js/search.js index f4620e84309..2ac062e96f3 100644 --- a/addons/web/static/src/js/search.js +++ b/addons/web/static/src/js/search.js @@ -1772,22 +1772,18 @@ instance.web.search.ExtendedSearchProposition = instance.web.OldWidget.extend(/* } var type = field.type; - var obj = instance.web.search.custom_filters.get_object(type); - if(obj === null) { - obj = instance.web.search.custom_filters.get_object("char"); - } - this.value = new (obj) (this); - if(this.value.set_field) { - this.value.set_field(field); + var Field = instance.web.search.custom_filters.get_object(type); + if(!Field) { + Field = instance.web.search.custom_filters.get_object("char"); } + this.value = new Field(this, field); _.each(this.value.operators, function(operator) { $('