diff --git a/pos_keyboard/__manifest__.py b/pos_keyboard/__manifest__.py index de43097..4641e58 100644 --- a/pos_keyboard/__manifest__.py +++ b/pos_keyboard/__manifest__.py @@ -26,6 +26,7 @@ ], "external_dependencies": {"python": [], "bin": []}, "data": [ + "data.xml" ], "demo": [ ], diff --git a/pos_keyboard/doc/changelog.rst b/pos_keyboard/doc/changelog.rst index c965cc3..ac8ea31 100644 --- a/pos_keyboard/doc/changelog.rst +++ b/pos_keyboard/doc/changelog.rst @@ -1,7 +1,8 @@ -.. _changelog: +`1.1.2` +------- + +**Fix:** Error on clicking numbers and enter in selection popups -Updates -======= `1.1.1` ------- diff --git a/pos_keyboard/static/src/js/pos.js b/pos_keyboard/static/src/js/pos.js index b1328de..fdcc836 100644 --- a/pos_keyboard/static/src/js/pos.js +++ b/pos_keyboard/static/src/js/pos.js @@ -50,12 +50,18 @@ odoo.define('pos_keyboard.pos', function (require) { } else if (data.type === type.backspace){ this.click_keyboard('BACKSPACE'); } else if (data.type === type.enter){ - this.click_confirm(); + if (this.click_confirm.length) { + return this.click_confirm(); + } + return; } else if (data.type === type.escape){ this.click_cancel(); } }, click_keyboard: function(value){ + if (typeof this.inputbuffer === 'undefined') { + return; + } var newbuf = this.gui.numpad_input( this.inputbuffer, value,