diff --git a/pos_debranding/README.rst b/pos_debranding/README.rst index aacf08e6..5bc7e266 100644 --- a/pos_debranding/README.rst +++ b/pos_debranding/README.rst @@ -18,10 +18,10 @@ Roadmap Further information =================== -HTML Description: https://apps.odoo.com/apps/modules/16.0/pos_debranding +HTML Description: https://apps.odoo.com/apps/modules/17.0/pos_debranding Usage instructions: ``_ Changelog: ``_ -Tested on `Odoo 16.0 `_ +Tested on `Odoo 17.0 `_ diff --git a/pos_debranding/__manifest__.py b/pos_debranding/__manifest__.py index fbe3d02d..341dfd7d 100644 --- a/pos_debranding/__manifest__.py +++ b/pos_debranding/__manifest__.py @@ -1,4 +1,4 @@ -# Copyright 2015-2018,2020,2022 Ivan Yelizariev +# Copyright 2015-2018,2020,2022-2023 Ivan Yelizariev # License MIT (https://opensource.org/licenses/MIT). { "name": "POS debranding", @@ -10,10 +10,15 @@ "website": "https://odoo-debranding.com", "depends": ["point_of_sale"], "assets": { - "web.assets_backend": ["pos_debranding/static/src/js/tour.js"], - "point_of_sale.assets": [ + "point_of_sale.assets_prod": [ "pos_debranding/static/src/xml/pos_debranding.xml", ], + "web.assets_tests": [ + "pos_debranding/static/src/js/tour.js", + ], }, + "data": [ + "views/pos.xml", + ], "installable": True, } diff --git a/pos_debranding/static/src/js/tour.js b/pos_debranding/static/src/js/tour.js index 2f29510a..b363ba0e 100644 --- a/pos_debranding/static/src/js/tour.js +++ b/pos_debranding/static/src/js/tour.js @@ -1,9 +1,15 @@ -odoo.define("pos_debranding.tour", function (require) { - var tour = require("web_tour.tour"); +/** @odoo-module **/ +// Copyright 2015-2018,2020,2022-2023 Ivan Yelizariev +// License OPL-1 (https://www.odoo.com/documentation/17.0/legal/licenses.html#odoo-apps) +import { registry } from "@web/core/registry"; +import { stepUtils } from "@web_tour/tour_service/tour_utils"; - var steps = [ - tour.stepUtils.showAppsMenuItem(), +registry.category("web_tour.tours").add("pos_debranding.tour", { + url: "/web", + steps: () => [ + stepUtils.showAppsMenuItem(), { + test: true, trigger: '.o_app[data-menu-xmlid="point_of_sale.menu_point_root"]', content: "Ready to launch your point of sale? Click here.", position: "right", @@ -42,7 +48,5 @@ odoo.define("pos_debranding.tour", function (require) { // It's a check }, }, - ]; - - tour.register("pos_debranding_tour", { test: true, url: "/web" }, steps); + ], }); diff --git a/pos_debranding/static/src/xml/pos_debranding.xml b/pos_debranding/static/src/xml/pos_debranding.xml index 2e2ec236..d248194d 100644 --- a/pos_debranding/static/src/xml/pos_debranding.xml +++ b/pos_debranding/static/src/xml/pos_debranding.xml @@ -1,8 +1,10 @@ + diff --git a/pos_debranding/tests/test_default.py b/pos_debranding/tests/test_default.py index f29cc71b..79945936 100644 --- a/pos_debranding/tests/test_default.py +++ b/pos_debranding/tests/test_default.py @@ -4,19 +4,9 @@ @tagged("post_install", "-at_install") class TestUi(HttpCase): def test_01_check_logo(self): - env = self.env - # needed because tests are run before the module is marked as - # installed. In js web will only load qweb coming from modules - # that are returned by the backend in module_boot. Without - # this you end up with js, css but no qweb. - env["ir.module.module"].search( - [("name", "=", "pos_debranding")], limit=1 - ).state = "installed" - self.browser_js( + self.start_tour( "/web", - "odoo.__DEBUG__.services['web_tour.tour']" ".run('pos_debranding_tour')", - "odoo.__DEBUG__.services['web_tour.tour']" - ".tours.pos_debranding_tour.ready", + "pos_debranding.tour", login="admin", timeout=240, ) diff --git a/pos_debranding/views/pos.xml b/pos_debranding/views/pos.xml new file mode 100644 index 00000000..a02865a0 --- /dev/null +++ b/pos_debranding/views/pos.xml @@ -0,0 +1,10 @@ + + + + +