Browse Source

Fix version and add comments.

pull/488/head
François Kawala 5 years ago
parent
commit
af26ac9e29
  1. 2
      pos_accented_search/__manifest__.py
  2. 4
      pos_accented_search/static/src/js/db.js

2
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)",

4
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");

Loading…
Cancel
Save