diff --git a/web_advanced_search_wildcard/README.rst b/web_advanced_search_wildcard/README.rst index a1a8d974..8fa5a8bc 100644 --- a/web_advanced_search_wildcard/README.rst +++ b/web_advanced_search_wildcard/README.rst @@ -25,11 +25,13 @@ Wildcard in advanced search |badge1| |badge2| |badge3| |badge4| |badge5| -This module adds 3 options to advanced search of char, many2one, +This module adds new options to advanced search of char, many2one, many2many and one2many fields: * *starts with* (uses the domain *=ilike %*), +* *doesn't start with* (uses the domain *not ilike %*), * *ends with* (uses the domain *=ilike %*), +* *doesn't end with* (uses the domain *not ilike %*), * *matches* (uses the domain *=ilike *). @@ -79,7 +81,7 @@ Contributors * L Freeke * Alex Comba * Alexis de Lattre - +* Souheil Bejaoui Maintainers ~~~~~~~~~~~ diff --git a/web_advanced_search_wildcard/readme/CONTRIBUTORS.rst b/web_advanced_search_wildcard/readme/CONTRIBUTORS.rst index 9df63506..88870716 100644 --- a/web_advanced_search_wildcard/readme/CONTRIBUTORS.rst +++ b/web_advanced_search_wildcard/readme/CONTRIBUTORS.rst @@ -3,4 +3,4 @@ * L Freeke * Alex Comba * Alexis de Lattre - +* Souheil Bejaoui diff --git a/web_advanced_search_wildcard/readme/DESCRIPTION.rst b/web_advanced_search_wildcard/readme/DESCRIPTION.rst index 6359f371..30296f89 100644 --- a/web_advanced_search_wildcard/readme/DESCRIPTION.rst +++ b/web_advanced_search_wildcard/readme/DESCRIPTION.rst @@ -1,7 +1,9 @@ -This module adds 3 options to advanced search of char, many2one, +This module adds new options to advanced search of char, many2one, many2many and one2many fields: * *starts with* (uses the domain *=ilike %*), +* *doesn't start with* (uses the domain *not ilike %*), * *ends with* (uses the domain *=ilike %*), +* *doesn't end with* (uses the domain *not ilike %*), * *matches* (uses the domain *=ilike *). diff --git a/web_advanced_search_wildcard/static/description/index.html b/web_advanced_search_wildcard/static/description/index.html index 569088bb..a6ee043f 100644 --- a/web_advanced_search_wildcard/static/description/index.html +++ b/web_advanced_search_wildcard/static/description/index.html @@ -368,11 +368,13 @@ ul.auto-toc { !! changes will be overwritten. !! !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! -->

Beta License: AGPL-3 OCA/web Translate me on Weblate Try me on Runbot

-

This module adds 3 options to advanced search of char, many2one, +

This module adds new options to advanced search of char, many2one, many2many and one2many fields:

  • starts with (uses the domain =ilike %<search string>),
  • +
  • doesn’t start with (uses the domain not ilike %<search string>),
  • ends with (uses the domain =ilike <search string>%),
  • +
  • doesn’t end with (uses the domain not ilike <search string>%),
  • matches (uses the domain =ilike <search string>).

Table of contents

@@ -421,6 +423,7 @@ If you spotted it first, help us smashing it by providing a detailed and welcome
  • L Freeke <lfreeke@therp.nl>
  • Alex Comba <alex.comba@agilebg.com>
  • Alexis de Lattre <alexis.delattre@akretion.com>
  • +
  • Souheil Bejaoui <souheil.bejaoui@acsone.eu>
  • diff --git a/web_advanced_search_wildcard/static/src/js/search.js b/web_advanced_search_wildcard/static/src/js/search.js index 9a424a34..bfbc2ddc 100644 --- a/web_advanced_search_wildcard/static/src/js/search.js +++ b/web_advanced_search_wildcard/static/src/js/search.js @@ -7,7 +7,9 @@ odoo.define('web_advanced_search_wildcard', function (require) { Char.prototype.operators.push( {value: "startswith", text: _lt("starts with")}, + {value: "not_startswith", text: _lt("doesn't start with")}, {value: "endswith", text: _lt("ends with")}, + {value: "not_endswith", text: _lt("doesn't end with")}, {value: '=ilike', text: _lt("matches")} ); @@ -17,7 +19,9 @@ odoo.define('web_advanced_search_wildcard', function (require) { case '∃': return [[field.name, '!=', false]]; case '∄': return [[field.name, '=', false]]; case 'startswith': return [[field.name, '=ilike', this.get_value() + '%']]; + case 'not_startswith': return [[field.name, 'not =ilike', this.get_value() + '%']]; case 'endswith': return [[field.name, '=ilike', '%' + this.get_value()]]; + case 'not_endswith': return [[field.name, 'not =ilike', '%' + this.get_value()]]; default: return [[field.name, operator.value, this.get_value()]]; } },