Skip to content

Commit 5603adb

Browse files
author
GabbasovDinar
committed
🛡️ pos_logout
1 parent 9d7327c commit 5603adb

File tree

2 files changed

+13
-9
lines changed

2 files changed

+13
-9
lines changed

pos_logout/static/src/js/tour.js

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,20 @@ odoo.define('pos_logout.tour', function(require) {
33

44
var tour = require('web_tour.tour');
55

6-
var steps = [{
7-
trigger: '.o_app[data-menu-xmlid="point_of_sale.menu_point_root"], .oe_menu_toggler[data-menu-xmlid="point_of_sale.menu_point_root"]',
6+
var steps = [tour.STEPS.SHOW_APPS_MENU_ITEM, {
7+
trigger: '.o_app[data-menu-xmlid="point_of_sale.menu_point_root"]',
88
content: "Ready to launch your <b>point of sale</b>? <i>Click here</i>.",
9+
position: 'right',
10+
edition: 'community'
11+
}, {
12+
trigger: '.o_app[data-menu-xmlid="point_of_sale.menu_point_root"]',
13+
content: "Ready to launch your <b>point of sale</b>? <i>Click here</i>.",
14+
position: 'bottom',
15+
edition: 'enterprise'
916
}, {
1017
trigger: ".o_pos_kanban button.oe_kanban_action_button",
1118
content: "<p>Click to start the point of sale interface. It <b>runs on tablets</b>, laptops, or industrial hardware.</p><p>Once the session launched, the system continues to run without an internet connection.</p>",
19+
position: "bottom"
1220
}];
1321

1422
steps = steps.concat([{
@@ -31,7 +39,7 @@ odoo.define('pos_logout.tour', function(require) {
3139
trigger: '.popups .block',
3240
content: 'Click for unblock the screen',
3341
}, {
34-
trigger: '.modal-dialog:visible .selection-item:contains("Administrator")',
42+
trigger: '.modal-dialog:visible .selection-item:contains("Mitchell Admin")',
3543
content: 'Change current cashier',
3644
}]);
3745

@@ -43,7 +51,7 @@ odoo.define('pos_logout.tour', function(require) {
4351
content: "confirm closing the frontend",
4452
}, {
4553
content: "wait until backend is opened",
46-
trigger: '.o_app[data-menu-xmlid="point_of_sale.menu_point_root"], .oe_menu_toggler[data-menu-xmlid="point_of_sale.menu_point_root"]',
54+
trigger: '.o_pos_kanban button.oe_kanban_action_button',
4755
run: function () {
4856
// no need to click on trigger
4957
},

pos_logout/tests/test_default.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,7 @@
77
class TestUi(odoo.tests.HttpCase):
88

99
def test_01_pos_is_loaded(self):
10-
# see more https://odoo-development.readthedocs.io/en/latest/dev/tests/js.html#phantom-js-python-tests
11-
cr = self.registry.cursor()
12-
assert cr == self.registry.test_cr
13-
env = Environment(cr, self.uid, {})
10+
env = self.env
1411

1512
# From https://github.com/odoo/odoo/blob/11.0/addons/point_of_sale/tests/test_frontend.py#L292-L297
1613
#
@@ -19,7 +16,6 @@ def test_01_pos_is_loaded(self):
1916
# that are returned by the backend in module_boot. Without
2017
# this you end up with js, css but no qweb.
2118
env['ir.module.module'].search([('name', '=', 'pos_logout')], limit=1).state = 'installed'
22-
self.registry.test_cr.release()
2319

2420
self.phantom_js(
2521
'/web',

0 commit comments

Comments
 (0)