Skip to content
Permalink
Browse files

🚑, pos_keyboard:

 Duplicated event listener
  • Loading branch information...
ssaid authored and fedoranvar committed May 6, 2019
1 parent 131624c commit 335ac65e4152f34724cb2dd51a95df760ea7d367
Showing with 13 additions and 1 deletion.
  1. +1 −1 pos_keyboard/__manifest__.py
  2. +5 −0 pos_keyboard/doc/changelog.rst
  3. +7 −0 pos_keyboard/static/src/js/pos.js
@@ -11,7 +11,7 @@
"category": "Point Of Sale",
# "live_test_url": "http://apps.it-projects.info/shop/product/DEMO-URL?version={ODOO_BRANCH}",
"images": ['images/keyboard.png'],
"version": "12.0.1.1.3",
"version": "12.0.1.1.4",
"application": False,

"author": "IT-Projects LLC, Ivan Yelizariev",
@@ -1,3 +1,8 @@
`1.1.4`
-------

**Fix:** Incompatibility with some modules led to the action duplicating

`1.1.3`
-------

@@ -2,6 +2,7 @@
Copyright 2016 ufaks <https://github.com/ufaks>
Copyright 2016 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
Copyright 2019 Kolushov Alexandr <https://it-projects.info/team/kolushovalexandr>
Copyright 2019 ssaid <https://github.com/ssaid>
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). */
odoo.define('pos_keyboard.pos', function (require) {
"use strict";
@@ -134,6 +135,7 @@ odoo.define('pos_keyboard.pos', function (require) {
val: undefined
};
this.action_callback = undefined;
this.active = false;
},

save_callback: function(){
@@ -159,6 +161,9 @@ odoo.define('pos_keyboard.pos', function (require) {
// calling the callback when needed.
connect: function(){
var self = this;
if (self.active) {
return;
}
// --- additional keyboard ---//
// KeyCode: + or - (Keypad '+')
var KC_PLU = 107;
@@ -258,11 +263,13 @@ odoo.define('pos_keyboard.pos', function (require) {
}, 50);
}
});
self.active = true;
},

// stops catching keyboard events
disconnect: function(){
$('body').off('keyup', '');
self.active = false;
}
});

0 comments on commit 335ac65

Please sign in to comment.
You can’t perform that action at this time.