diff --git a/pos_keyboard/__manifest__.py b/pos_keyboard/__manifest__.py index 029aaef..3746a82 100644 --- a/pos_keyboard/__manifest__.py +++ b/pos_keyboard/__manifest__.py @@ -1,4 +1,3 @@ -# -*- coding: utf-8 -*- # Copyright 2015 igallyamov # Copyright 2016 ufaks # Copyright 2016-2018 Ivan Yelizariev @@ -11,13 +10,14 @@ "category": "Point Of Sale", # "live_test_url": "http://apps.it-projects.info/shop/product/DEMO-URL?version={ODOO_BRANCH}", "images": ['images/keyboard.png'], - "version": "10.0.1.1.5", + "version": "11.0.1.1.5", "application": False, "author": "IT-Projects LLC, Ivan Yelizariev", "support": "apps@it-projects.info", "website": "https://it-projects.info/team/yelizariev", "license": "LGPL-3", + "price": 15.00, "currency": "EUR", diff --git a/pos_keyboard/data.xml b/pos_keyboard/data.xml index 0356589..06b62e2 100644 --- a/pos_keyboard/data.xml +++ b/pos_keyboard/data.xml @@ -16,5 +16,5 @@ - + diff --git a/pos_keyboard/doc/index.rst b/pos_keyboard/doc/index.rst index 500aa2c..9de727c 100644 --- a/pos_keyboard/doc/index.rst +++ b/pos_keyboard/doc/index.rst @@ -37,7 +37,7 @@ Backspace ``<-`` delete symbol ----------- --------------------- ------------------ Enter ``Ok`` confirmation ----------- --------------------- ------------------ -Esc ``Cancel`` close Pop-up +Esc ``Cancel`` close Pop-up =========== ===================== ================== User Scenario @@ -49,12 +49,12 @@ User Scenario * You can use ``Backspace`` if you want to delete symbol * You can use ``Enter`` if you want to confirm PIN code * You can use ``Esc`` if you want to close the Pop-up keyboard - + * Work in your own account using hotkeys for each mode on the Numpad or just press Extra keys. Then enter numbers. - + * You can use ``/`` or ``q`` in case of Qrt mode * You can use ``-`` or ``d`` in case of Disc mode * You can use ``*`` or ``p`` in case of Price mode - * You can use ``+`` or ``s`` in case of +/- + * You can use ``+`` or ``s`` in case of +/- RESULT: In opened POS Keyboard support is invoked instantly and available for further work without any extra action. diff --git a/pos_keyboard/static/src/js/pos.js b/pos_keyboard/static/src/js/pos.js index f9f4629..5bc9bdb 100644 --- a/pos_keyboard/static/src/js/pos.js +++ b/pos_keyboard/static/src/js/pos.js @@ -104,7 +104,7 @@ odoo.define('pos_keyboard.pos', function (require) { } } }); - + screens.PaymentScreenWidget.include({ show: function(){ this._super(); @@ -115,8 +115,8 @@ odoo.define('pos_keyboard.pos', function (require) { this.pos.keypad.connect(); } }); - - // this module mimics a keypad-only cash register. Use connect() and + + // this module mimics a keypad-only cash register. Use connect() and // disconnect() to activate and deactivate it. var Keypad = core.Class.extend({ init: function(attributes){ @@ -248,7 +248,7 @@ odoo.define('pos_keyboard.pos', function (require) { self.data.type = undefined; self.data.val = undefined; ok = false; - } + } if (is_number) { if (timeStamp + 50 > new Date().getTime()) { @@ -266,13 +266,13 @@ odoo.define('pos_keyboard.pos', function (require) { self.active = true; }, - // stops catching keyboard events + // stops catching keyboard events disconnect: function(){ $('body').off('keyup', ''); self.active = false; } }); - + return { Keypad: Keypad }; diff --git a/pos_keyboard/tests/test_pos_keyboard.py b/pos_keyboard/tests/test_pos_keyboard.py index 34c0b8d..8e7c6e7 100644 --- a/pos_keyboard/tests/test_pos_keyboard.py +++ b/pos_keyboard/tests/test_pos_keyboard.py @@ -8,11 +8,12 @@ import odoo.tests @odoo.tests.common.at_install(True) @odoo.tests.common.post_install(True) class TestUi(odoo.tests.HttpCase): - def test_pos_keyboard(self): # without a delay there might be problems on the steps whilst opening a POS # caused by a not yet loaded button's action - self.phantom_js("/web", - "odoo.__DEBUG__.services['web_tour.tour'].run('pos_keyboard_tour', 500)", - "odoo.__DEBUG__.services['web_tour.tour'].tours.pos_keyboard_tour.ready", - login="admin") + self.phantom_js( + "/web", + "odoo.__DEBUG__.services['web_tour.tour'].run('pos_keyboard_tour', 500)", + "odoo.__DEBUG__.services['web_tour.tour'].tours.pos_keyboard_tour.ready", + login="admin", + )