3bbec520e9fda603e2e7a4bd45ad84d61d51cd0c
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#66466
X-original-commit: d056feb4ac885acc6c829c57531b985027d94daf
Signed-off-by: Nicolas Lempereur (nle) <nle@odoo.com>
Co-authored-by: Joseph Caburnay <jcb@odoo.com>
Odoo
Odoo is a suite of web based open source business apps.
The main Odoo Apps include an Open Source CRM, Website Builder, eCommerce, Warehouse Management, Project Management, Billing & Accounting, Point of Sale, Human Resources, Marketing, Manufacturing, ...
Odoo Apps can be used as stand-alone applications, but they also integrate seamlessly so you get a full-featured Open Source ERP when you install several Apps.
Getting started with Odoo
For a standard installation please follow the Setup instructions from the documentation.
To learn the software, we recommend the Odoo eLearning, or Scale-up, the business game. Developers can start with the developer tutorials
Languages
Python
49.6%
JavaScript
47.8%
SCSS
2%
CSS
0.3%
HTML
0.2%