diff --git a/pos_accented_search/__manifest__.py b/pos_accented_search/__manifest__.py index f320d8a1..4dea3855 100644 --- a/pos_accented_search/__manifest__.py +++ b/pos_accented_search/__manifest__.py @@ -1,7 +1,7 @@ # License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl.html). { 'name': "Point of Sale - Accented Product Search", - 'version': '12.0.0.0.2', + 'version': '12.0.1.0.0', 'category': 'Point of Sale', 'summary': 'Point of Sale - Product search works regardless of accented characters', 'author': "Le Nid, Odoo Community Association (OCA)", diff --git a/pos_accented_search/static/src/js/db.js b/pos_accented_search/static/src/js/db.js index 519c72cd..7998ed6d 100644 --- a/pos_accented_search/static/src/js/db.js +++ b/pos_accented_search/static/src/js/db.js @@ -5,6 +5,10 @@ odoo.define('pos_accented_search', function (require) { db.include({ normalize_characters: function (product) { + // The normalization extract out combining diacritical marks + // All those diacritics in range [\u0300-\u036f]. + // See https://en.wikipedia.org/wiki/Combining_Diacritical_Marks. + // All the diacritics are removed by the code below. return product.normalize("NFD") .replace(/[\u0300-\u036f]/g, "") .replace(/[\u0152-\u0153]/g, "oe");