diff --git a/web_advanced_search_wildcard/__manifest__.py b/web_advanced_search_wildcard/__manifest__.py index 2dedce8be..a4c925693 100644 --- a/web_advanced_search_wildcard/__manifest__.py +++ b/web_advanced_search_wildcard/__manifest__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2014 initOS GmbH & Co. KG (). # Copyright 2016 Therp BV . # Copyright 2017 Alex Comba - Agile Business Group diff --git a/web_advanced_search_wildcard/static/src/js/search.js b/web_advanced_search_wildcard/static/src/js/search.js index c3f2c3c5b..5eb0e285f 100644 --- a/web_advanced_search_wildcard/static/src/js/search.js +++ b/web_advanced_search_wildcard/static/src/js/search.js @@ -15,13 +15,12 @@ odoo.define('web_advanced_search_wildcard', function (require) { Char.include({ get_domain: function (field, operator) { - var res = this._super(field, operator); switch (operator.value) { - case 'startswith': return [[field.name, '=ilike', this.get_value() + '%']]; - case 'not_startswith': return ['!', [field.name, '=ilike', this.get_value() + '%']]; - case 'endswith': return [[field.name, '=ilike', '%' + this.get_value()]]; - case 'not_endswith': return ['!', [field.name, '=ilike', '%' + this.get_value()]]; - default: return res; + case 'startswith': return [[field.name, '=ilike', this.get_value() + '%']]; + case 'not_startswith': return ['!', [field.name, '=ilike', this.get_value() + '%']]; + case 'endswith': return [[field.name, '=ilike', '%' + this.get_value()]]; + case 'not_endswith': return ['!', [field.name, '=ilike', '%' + this.get_value()]]; + default: return this._super(field, operator); } }, });