Odoo Help


How to modify the behavior of the « enter » key in the PoS interface?

Pascal Tremblay
on 11/25/15, 4:04 PM 1,396 views

Hello all,

See the screen below. At this place, by default, the « enter » key of the keyboard has the same behavior than a click on the « Validate » button. 

We rather want that the « enter » key simulate a click of the « Invoice » button.

How to achieve this?



Axel Mendoza

--Axel Mendoza--
| 7 8 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full-time employee trying to understand what to do and how

Reach me at aekroft@gmail.com

Axel Mendoza
On 11/25/15, 8:13 PM

Hi @Pascal Tremblay

Here is how:

openerp.pos_test = function (instance) {
var _t = instance.web._t,
_lt = instance.web._lt;
var QWeb = instance.web.qweb;

init: function(parent, options) {
var self = this;
this.hotkey_handler = function(event){
if(event.which === 13){
self.validate_order({invoice: true});
}else if(event.which === 27){
document.body.addEventListener('keyup', this.hotkey_handler);

Thanks 1000 times. I could never code it myself! Ouf!

Pascal Tremblay
on 11/25/15, 8:37 PM

Happy to help

Axel Mendoza
on 11/25/15, 8:42 PM

This code works well. Thanks again.

Pascal Tremblay
on 12/7/15, 3:54 PM

About This Community

This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 11/25/15, 4:04 PM
Seen: 1396 times
Last updated: 11/26/15, 1:36 AM