diff --git a/web_advanced_search_wildcard/README.rst b/web_advanced_search_wildcard/README.rst index 8c6de995..47ec7d85 100644 --- a/web_advanced_search_wildcard/README.rst +++ b/web_advanced_search_wildcard/README.rst @@ -1,5 +1,6 @@ -.. image:: https://img.shields.io/badge/licence-AGPL--3-blue.svg - :alt: License: AGPL-3 +.. image:: https://img.shields.io/badge/license-AGPL--3-blue.png + :target: https://www.gnu.org/licenses/agpl + :alt: License: AGPL-3 ============================ Wildcard in advanced search @@ -7,7 +8,6 @@ Wildcard in advanced search Allows =ilike ('matches') operator to advanced search option. - Usage ===== Use % as a placeholder. @@ -17,17 +17,16 @@ 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 `_. +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 smash it by providing detailed and welcomed feedback. Credits ======= @@ -35,7 +34,7 @@ Credits Images ------ -* Odoo Community Association: `Icon `_. +* Odoo Community Association: `Icon `_. Contributors ------------ @@ -43,14 +42,16 @@ Contributors * Markus Schneider * Thomas Rehn * L Freeke +* Alex Comba +Do not contact contributors directly about support or help with technical issues. Maintainer ---------- .. image:: https://odoo-community.org/logo.png - :alt: Odoo Community Association - :target: https://odoo-community.org + :alt: Odoo Community Association + :target: https://odoo-community.org This module is maintained by the OCA. diff --git a/web_advanced_search_wildcard/__manifest__.py b/web_advanced_search_wildcard/__manifest__.py new file mode 100644 index 00000000..72c59d44 --- /dev/null +++ b/web_advanced_search_wildcard/__manifest__.py @@ -0,0 +1,22 @@ +# -*- coding: utf-8 -*- +# Copyright 2014 initOS GmbH & Co. KG (). +# Copyright 2016 Therp BV . +# Copyright 2017 Alex Comba - Agile Business Group +# License AGPL-3.0 or later (https://www.gnu.org/licenses/agpl). +{ + "name": "Wildcard in advanced search", + "summary": "Webmodule to add wildcard operators in advanced search field", + "version": "10.0.1.0.0", + "category": "web", + "license": "AGPL-3", + "author": "initOS GmbH & Co. KG, Therp BV, " + "Odoo Community Association (OCA)", + "application": False, + "installable": True, + "depends": [ + "web" + ], + "data": [ + "views/template.xml", + ], +} diff --git a/web_advanced_search_wildcard/__openerp__.py b/web_advanced_search_wildcard/__openerp__.py deleted file mode 100644 index 797f3a60..00000000 --- a/web_advanced_search_wildcard/__openerp__.py +++ /dev/null @@ -1,21 +0,0 @@ -# -*- 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/web_advanced_search_wildcard.pot b/web_advanced_search_wildcard/i18n/it.po similarity index 55% rename from web_advanced_search_wildcard/i18n/web_advanced_search_wildcard.pot rename to web_advanced_search_wildcard/i18n/it.po index e187a2da..0f078223 100644 --- a/web_advanced_search_wildcard/i18n/web_advanced_search_wildcard.pot +++ b/web_advanced_search_wildcard/i18n/it.po @@ -1,23 +1,25 @@ -# Translation of OpenERP Server. +# Translation of Odoo Server. # This file contains the translation of the following modules: +# * web_advanced_search_wildcard # msgid "" msgstr "" -"Project-Id-Version: OpenERP Server 7.0\n" +"Project-Id-Version: Odoo Server 10.0+e\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" +"POT-Creation-Date: 2017-12-12 08:19+0000\n" +"PO-Revision-Date: 2017-12-12 09:25+0100\n" +"Last-Translator: Alex Comba \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" +"Language: it\n" +"X-Generator: Poedit 2.0.4\n" #. module: web_advanced_search_wildcard #. openerp-web -#: code:addons/web_advanced_search_wildcard/static/src/js/search.js:4 +#: code:addons/web_advanced_search_wildcard/static/src/js/search.js:10 #, python-format msgid "matches" -msgstr "" - +msgstr "corrisponde a" diff --git a/web_advanced_search_wildcard/static/description/icon.png b/web_advanced_search_wildcard/static/description/icon.png new file mode 100644 index 00000000..3a0328b5 Binary files /dev/null and b/web_advanced_search_wildcard/static/description/icon.png differ diff --git a/web_advanced_search_wildcard/static/src/js/search.js b/web_advanced_search_wildcard/static/src/js/search.js index 1b43dc0c..edcdd080 100644 --- a/web_advanced_search_wildcard/static/src/js/search.js +++ b/web_advanced_search_wildcard/static/src/js/search.js @@ -1,6 +1,12 @@ -openerp.web_advanced_search_wildcard = function(instance){ - var _lt = instance.web._lt; - instance.web.search.ExtendedSearchProposition.Char.prototype.operators.push( +odoo.define('web_advanced_search_wildcard', function (require) { + "use strict"; + + var core = require('web.core'); + var search_filters = require('web.search_filters'); + + var _lt = core._lt; + + search_filters.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 index bfe353d5..dbdff601 100644 --- a/web_advanced_search_wildcard/views/template.xml +++ b/web_advanced_search_wildcard/views/template.xml @@ -1,10 +1,10 @@ - - - - - + + +