I have been trying to use an on-change for a character field. Odoo triggers on-change function when the cursor is changed. I need it to trigger when enter button is pressed. The goal is to use it with a barcode scanner.
I also tried it with a many2one and many2many but with the barcode scanner the enter gets pressed so quickly that it doesn't give time for the many2one to load. For example by default the many2one will show suggestion, first one will be record 1. If i scan the barcode of record 2. Many2one won't get time to load the one which is scanned. so in the on-change function we will be getting record 1 itself.
Is there any way to trigger an on-change with enter key for a char field in odoo?