From 95ff2ca181fb6f1450a8c397e7a94ba84373fda2 Mon Sep 17 00:00:00 2001 From: Julien Schwanen Date: Mon, 19 Aug 2024 09:21:53 +0200 Subject: [PATCH] [ADD] Cosntruction: Adding knowledge tour Addding a purple dot pointing to the knowledge app. task-4056239 --- construction/__init__.py | 9 +++++++ construction/__manifest__.py | 8 ++++++- construction/static/src/binary/js/my_tour.js | 25 ++++++++++++++++++++ industry_restaurant/data/pos_combo_item.xml | 19 +++++++++++++++ 4 files changed, 60 insertions(+), 1 deletion(-) create mode 100644 construction/__init__.py create mode 100644 construction/static/src/binary/js/my_tour.js create mode 100644 industry_restaurant/data/pos_combo_item.xml diff --git a/construction/__init__.py b/construction/__init__.py new file mode 100644 index 000000000..0228f0c7f --- /dev/null +++ b/construction/__init__.py @@ -0,0 +1,9 @@ +# -*- coding: utf-8 -*- +# Part of Odoo. See LICENSE file for full copyright and licensing details. + +from odoo.tests import HttpCase +from odoo.tests.common import HttpCase + +def testing(): + test = HttpCase() + test.start_tour("/", 'knowledge_tour', login="admin") \ No newline at end of file diff --git a/construction/__manifest__.py b/construction/__manifest__.py index 39d82ce31..4b7d8eaf5 100644 --- a/construction/__manifest__.py +++ b/construction/__manifest__.py @@ -64,6 +64,12 @@ 'demo/planning_recurrency.xml', 'demo/planning_slot.xml', ], + 'pre_init_hook': 'testing', + 'assets': { + 'web.assets_backend': [ + 'construction/static/src/js/my_tour.js', + ] + }, 'license': 'OPL-1', 'images': ['images/main.png'], -} +} \ No newline at end of file diff --git a/construction/static/src/binary/js/my_tour.js b/construction/static/src/binary/js/my_tour.js new file mode 100644 index 000000000..3c0460563 --- /dev/null +++ b/construction/static/src/binary/js/my_tour.js @@ -0,0 +1,25 @@ +import { _t } from "@web/core/l10n/translation"; +import { registry } from "@web/core/registry"; +import { stepUtils } from "@web_tour/tour_service/tour_utils"; + +import { markup } from "@odoo/owl"; + +registry.category("web_tour.tours").add("knowledge_tour", { + url: "/web", + rainbowManMessage: _t("Congrats, best of luck catching such big fish! :)"), + sequence: 0, + steps: () => [ + stepUtils.showAppsMenuItem(), + { + isActive: ["auto"], + trigger: '.o_app[data-menu-xmlid="knowledge.knowledge_menu_root"]', + content: markup( + _t( + "Ready to boost your sales? Let's have a look at your Pipeline." + ) + ), + position: "bottom", + run: "click", + }, + ], +}); \ No newline at end of file diff --git a/industry_restaurant/data/pos_combo_item.xml b/industry_restaurant/data/pos_combo_item.xml new file mode 100644 index 000000000..0fa29c556 --- /dev/null +++ b/industry_restaurant/data/pos_combo_item.xml @@ -0,0 +1,19 @@ + + + + + + + + + + + + + + + + + + +