diff --git a/web_advanced_search_wildcard/README.rst b/web_advanced_search_wildcard/README.rst new file mode 100644 index 00000000..8c6de995 --- /dev/null +++ b/web_advanced_search_wildcard/README.rst @@ -0,0 +1,61 @@ +.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg + :alt: License: AGPL-3 + +============================ +Wildcard in advanced search +============================ + +Allows =ilike ('matches') operator to advanced search option. + + +Usage +===== +Use % as a placeholder. + +Example: "Zip" - 'matches' - "1%" gives all zip starting with 1 + +.. image:: /web_advanced_search_wildcard/static/description/screenshot.png + :alt: Screenshot + + +Also allows insensitive exact search. +Example "Name" - 'matches' - "john" will find "John" and "john" but not "Johnson". + +Bug Tracker +=========== + +Bugs are tracked on `GitHub Issues `_. +In case of trouble, please check there if your issue has already been reported. +If you spotted it first, help us smashing it by providing a detailed and welcomed feedback +`here `_. + +Credits +======= + +Images +------ + +* Odoo Community Association: `Icon `_. + +Contributors +------------ + +* Markus Schneider +* Thomas Rehn +* L Freeke + + +Maintainer +---------- + +.. image:: https://odoo-community.org/logo.png + :alt: Odoo Community Association + :target: https://odoo-community.org + +This module is maintained by the OCA. + +OCA, or the Odoo Community Association, is a nonprofit organization whose +mission is to support the collaborative development of Odoo features and +promote its widespread use. + +To contribute to this module, please visit https://odoo-community.org. diff --git a/web_advanced_search_wildcard/__init__.py b/web_advanced_search_wildcard/__init__.py new file mode 100644 index 00000000..e69de29b diff --git a/web_advanced_search_wildcard/__openerp__.py b/web_advanced_search_wildcard/__openerp__.py new file mode 100644 index 00000000..797f3a60 --- /dev/null +++ b/web_advanced_search_wildcard/__openerp__.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# © 2014 initOS GmbH & Co. KG (). +# © 2016 Therp BV . +# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). + +{ + "name": "Wildcard in advanced search", + "summary": "Webmodule to add wildcard operators in advanced search field", + "version": "8.0.1.0.0", + "category": "web", + "license": 'AGPL-3', + "author": "initOS GmbH & Co. KG,Odoo Community Association (OCA),Therp BV", + "application": False, + "installable": True, + "depends": [ + "web" + ], + 'data': [ + "views/template.xml", + ], +} diff --git a/web_advanced_search_wildcard/i18n/de.po b/web_advanced_search_wildcard/i18n/de.po new file mode 100644 index 00000000..4cfbc4f3 --- /dev/null +++ b/web_advanced_search_wildcard/i18n/de.po @@ -0,0 +1,27 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# +# Rudolf Schnapka , 2015. +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-09-15 09:11+0000\n" +"PO-Revision-Date: 2015-01-04 14:07+0100\n" +"Last-Translator: Rudolf Schnapka \n" +"Language-Team: German \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: \n" +"Language: de\n" +"X-Generator: Lokalize 1.5\n" + +#. module: web_advanced_search_wildcard +#. openerp-web +#: code:addons/web_advanced_search_wildcard/static/src/js/search.js:4 +#, python-format +msgid "matches" +msgstr "gleicht" + + diff --git a/web_advanced_search_wildcard/i18n/en.po b/web_advanced_search_wildcard/i18n/en.po new file mode 100644 index 00000000..e85bb958 --- /dev/null +++ b/web_advanced_search_wildcard/i18n/en.po @@ -0,0 +1,24 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# +# Translators: +msgid "" +msgstr "" +"Project-Id-Version: web (7.0)\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2015-10-07 17:50+0000\n" +"PO-Revision-Date: 2015-10-07 17:50+0000\n" +"Last-Translator: OCA Transbot \n" +"Language-Team: English (http://www.transifex.com/oca/OCA-web-7-0/language/en/)\n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: \n" +"Language: en\n" +"Plural-Forms: nplurals=2; plural=(n != 1);\n" + +#. module: web_advanced_search_wildcard +#. openerp-web +#: code:addons/web_advanced_search_wildcard/static/src/js/search.js:4 +#, python-format +msgid "matches" +msgstr "matches" diff --git a/web_advanced_search_wildcard/i18n/web_advanced_search_wildcard.pot b/web_advanced_search_wildcard/i18n/web_advanced_search_wildcard.pot new file mode 100644 index 00000000..e187a2da --- /dev/null +++ b/web_advanced_search_wildcard/i18n/web_advanced_search_wildcard.pot @@ -0,0 +1,23 @@ +# Translation of OpenERP Server. +# This file contains the translation of the following modules: +# +msgid "" +msgstr "" +"Project-Id-Version: OpenERP Server 7.0\n" +"Report-Msgid-Bugs-To: \n" +"POT-Creation-Date: 2014-09-15 09:11+0000\n" +"PO-Revision-Date: 2014-09-15 11:12+0100\n" +"Last-Translator: M\n" +"Language-Team: \n" +"MIME-Version: 1.0\n" +"Content-Type: text/plain; charset=UTF-8\n" +"Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: \n" + +#. module: web_advanced_search_wildcard +#. openerp-web +#: code:addons/web_advanced_search_wildcard/static/src/js/search.js:4 +#, python-format +msgid "matches" +msgstr "" + diff --git a/web_advanced_search_wildcard/static/description/screenshot.png b/web_advanced_search_wildcard/static/description/screenshot.png new file mode 100644 index 00000000..57848f90 Binary files /dev/null and b/web_advanced_search_wildcard/static/description/screenshot.png differ diff --git a/web_advanced_search_wildcard/static/src/js/search.js b/web_advanced_search_wildcard/static/src/js/search.js new file mode 100644 index 00000000..1b43dc0c --- /dev/null +++ b/web_advanced_search_wildcard/static/src/js/search.js @@ -0,0 +1,6 @@ +openerp.web_advanced_search_wildcard = function(instance){ + var _lt = instance.web._lt; + instance.web.search.ExtendedSearchProposition.Char.prototype.operators.push( + {value: '=ilike', text: _lt("matches")} + ); +}; diff --git a/web_advanced_search_wildcard/views/template.xml b/web_advanced_search_wildcard/views/template.xml new file mode 100644 index 00000000..bfe353d5 --- /dev/null +++ b/web_advanced_search_wildcard/views/template.xml @@ -0,0 +1,10 @@ + + + + + +