Skip to content

Commit

Permalink
Fix version and add comments.
Browse files Browse the repository at this point in the history
  • Loading branch information
Fkawala committed May 17, 2020
1 parent 50b43e9 commit af26ac9
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pos_accented_search/__manifest__.py
Original file line number Diff line number Diff line change
@@ -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)",
Expand Down
4 changes: 4 additions & 0 deletions pos_accented_search/static/src/js/db.js
Original file line number Diff line number Diff line change
Expand Up @@ -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");
Expand Down

0 comments on commit af26ac9

Please sign in to comment.