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