summaryrefslogtreecommitdiff
path: root/addons/web/static/src/js/views/sample_server.js
diff options
context:
space:
mode:
authorNicolas Lempereur <nle@odoo.com>2021-02-10 19:04:56 +0000
committerNicolas Lempereur <nle@odoo.com>2021-02-15 12:29:04 +0000
commitd056feb4ac885acc6c829c57531b985027d94daf (patch)
treeb00ade9744e9c532a385ba328ca62deec41c6f38 /addons/web/static/src/js/views/sample_server.js
parent02d32aa9936cb0d9a1248bb866a31f4a40a0eac2 (diff)
[FIX] point_of_sale: select employee with pin by barcode
When switching employee on point of sale, we may have a PIN to enter. If we enter the barcode and there is a PIN, we get an "Invalid Password" error. Why: ==== When we switch with a barcode 12, the barcode system will catch events and prevent their propagation: - {'type': 'keypress', 'key': 49} - {'type': 'keypress', 'key': 50} - {'type': 'keypress', 'key': 13} For respectively '1', '2', 'Newline'. If it match an employee, the PIN number modal is opened which will listen to KEYUP events => it receives very shortly: - {'type': 'KEYUP', 'key': 13} which is the newline character which follows the KEYPRESS. With a "Return" key received, the PIN modale closes with empty value and an error "Invalid Password" is shown. Solution: ========= Ignore the newline character if no number has been selected. opw-2448585 closes odoo/odoo#66117 Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com> Co-authored-by: Joseph Caburnay <jcb@odoo.com>
Diffstat (limited to 'addons/web/static/src/js/views/sample_server.js')
0 files changed, 0 insertions, 0 deletions