From a37935b466e3d74e08d5ea41047185144e8e5b6f Mon Sep 17 00:00:00 2001 From: Joseph Caburnay Date: Tue, 25 May 2021 09:05:39 +0000 Subject: [FIX] point_of_sale: dot input should be recognized even at different lang Language such as FR recognizes `,` as the decimal separator. However, it is possible that the keyboard setting is American so the decimal point in the numpad will send `.` when pressing it. POS should be able to recognize both. This fix allows `.` sent from keyboard to be interpreted as decimal separator even at language where the decimal separator is `,`. This is okay because number inputs in POS doesn't take into account the thousand separator. --- addons/point_of_sale/static/src/js/Misc/NumberBuffer.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'addons') diff --git a/addons/point_of_sale/static/src/js/Misc/NumberBuffer.js b/addons/point_of_sale/static/src/js/Misc/NumberBuffer.js index f5f38d9cb00..8e25f601432 100644 --- a/addons/point_of_sale/static/src/js/Misc/NumberBuffer.js +++ b/addons/point_of_sale/static/src/js/Misc/NumberBuffer.js @@ -226,7 +226,7 @@ odoo.define('point_of_sale.NumberBuffer', function(require) { }; if (input === undefined || input === null) return; let isFirstInput = isEmpty(this.state.buffer); - if (input === this.decimalPoint) { + if (input === ',' || input === '.') { if (isFirstInput) { this.state.buffer = '0' + this.decimalPoint; } else if (!this.state.buffer.length || this.state.buffer === '-') { -- cgit v1.2.3