Browse Source

🛡️ JS-tour for connect-disconnect keyboard

pull/155/head
fedoranvar 5 years ago
committed by Vincent Van Rossem
parent
commit
a604f007d8
  1. 2
      pos_keyboard/README.rst
  2. 5
      pos_keyboard/__manifest__.py
  3. 29
      pos_keyboard/static/src/js/test_pos_keyboard.js

2
pos_keyboard/README.rst

@ -15,7 +15,7 @@ Contributors
------------
* `Ivan Yelizariev <https://it-projects.info/team/yelizariev>`__
* `Kolushov Alexandr <https://it-projects.info/team/KolushovAlexandr>`__
* `Kildebekov Anvar <https://it-projects.info/team/KildebekovAnvar>`__
* `Anvar Kildebekov <https://it-projects.info/team/fedoranvar>`__
Sponsors
--------

5
pos_keyboard/__manifest__.py

@ -1,9 +1,9 @@
# -*- coding: utf-8 -*-
# Copyright 2015 igallyamov <https://github.com/igallyamov>
# Copyright 2016 ufaks <https://github.com/ufaks>
# Copyright 2016-2018 Ivan Yelizariev <https://it-projects.info/team/yelizariev>
# Copyright 2018 Ruslan Ronzhin <https://it-projects.info/team/rusllan>
# Copyright 2019 Kolushov Alexandr <https://it-projects.info/team/kolushovalexandr>
# Copyright 2019 Kildebekov Anvar https://it-projects.info/team/kildebekov>
# License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html).
{
"name": """Keyboard support in Point Of Sale""",
@ -11,14 +11,13 @@
"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.4",
"version": "10.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",

29
pos_keyboard/static/src/js/test_pos_keyboard.js

@ -1,5 +1,5 @@
/* Copyright 2019 Kolushov Alexandr <https://it-projects.info/team/kolushovalexandr>
Copyright 2019 Kildebekov Anvar <https://it-projects.info/team/kildebekov>
Copyright 2019 Anvar Kildebekov <https://it-projects.info/team/fedoranvar>
License LGPL-3.0 or later (https://www.gnu.org/licenses/lgpl.html). */
odoo.define('pos_keyboard.tour', function (require) {
"use strict";
@ -25,7 +25,7 @@ odoo.define('pos_keyboard.tour', function (require) {
content: "Switch to table or make dummy action",
trigger: '.table:not(.oe_invisible .neworder-button), .order-button.selected',
position: "bottom",
timeout: 20000,
timeout: 30000,
}, {
content: 'waiting for loading to finish',
trigger: '.order-button.neworder-button',
@ -62,6 +62,26 @@ odoo.define('pos_keyboard.tour', function (require) {
}];
}
function connect_disconnect_keyboard() {
var stps = [{
content: "Open Payment-Screen",
trigger: '.pay-circle',
}];
if (odoo._modules.indexOf('pos_cashier_select') !== -1) {
stps = stps.concat([{
trigger: '.modal-dialog.cashier .selection-item:contains("Admin")',
content: 'select first cashier',
}]);
}
stps = stps.concat([{
content: 'Close Payment-Screen',
trigger: '.button:contains(Back)',
}]);
return stps;
}
function open_cashier_popup_and_close_it() {
return [{
content: "Open cashier selection popup",
@ -86,9 +106,12 @@ odoo.define('pos_keyboard.tour', function (require) {
}
var steps = [];
var quantity = 3;
steps = steps.concat(open_pos_neworder());
steps = steps.concat(add_product_to_order('Miscellaneous'));
steps = steps.concat(update_qty_for_product(3));
steps = steps.concat(update_qty_for_product(quantity));
steps = steps.concat(connect_disconnect_keyboard());
steps = steps.concat(update_qty_for_product(quantity+1));
steps = steps.concat(open_cashier_popup_and_close_it());
tour.register('pos_keyboard_tour', { test: true, url: '/web' }, steps);

Loading…
Cancel
Save