[FIX] barcodes: prevent `enter` if barcode
To reproduce the issue:
(Need `stock_barcode` and a real barcode scanner)
1. Create two products P01 and P02, each one with a barcode
2. Barcode > Operations > Receipts, Create
3. Scan P01
4. Scan P02
5. Click on the `+1` button on the line of P01
6. Scan P02
Error: Both lines are incremented. Scanning P01 should not impact the
quantity of P01
Because of step 5, the focus is still on that button when scanning
again P02 (step 6). Moreover, the scanner ends the barcode transmission
of P02 with an `enter` -> it will generate an event on the `+1` button,
which explains why the quantity of P01 is also incremented.
OPW-3232437
closes odoo/odoo#122125
Signed-off-by:
William Henrotin (whe) <whe@odoo.com>
Please register or sign in to comment