diff --git a/addons/website/data/ir_asset.xml b/addons/website/data/ir_asset.xml index 1eb9e832840..7ae97f1475d 100644 --- a/addons/website/data/ir_asset.xml +++ b/addons/website/data/ir_asset.xml @@ -25,7 +25,8 @@ - website.configurator_tour + website.configurator_tour + Website Configurator Tour website.assets_editor website/static/src/js/tours/configurator_tour.js diff --git a/addons/website/models/website.py b/addons/website/models/website.py index 1a948b398cc..df51c95e313 100644 --- a/addons/website/models/website.py +++ b/addons/website/models/website.py @@ -418,8 +418,8 @@ class Website(models.Model): website.configurator_done = True # Enable tour - tour_asset_id = self.env['ir.asset']._get_related_assets([('name', '=', 'website.configurator_tour')]) - tour_asset_id.sudo().write({'active': True}) + tour_asset_id = self.env.ref('website.configurator_tour') + tour_asset_id.copy({'key': tour_asset_id.key, 'website_id': website.id, 'active': True}) # logo was generated as base64 url logo = kwargs.get('logo') diff --git a/addons/website/static/src/js/tours/configurator_tour.js b/addons/website/static/src/js/tours/configurator_tour.js index 22b554d3695..16e44031fb7 100644 --- a/addons/website/static/src/js/tours/configurator_tour.js +++ b/addons/website/static/src/js/tours/configurator_tour.js @@ -1,4 +1,4 @@ -odoo.define("website.configurator.tour", function (require) { +odoo.define("website.configurator_tour", function (require) { "use strict"; const wTourUtils = require("website.tour_utils"); diff --git a/addons/website/static/src/js/tours/tour_utils.js b/addons/website/static/src/js/tours/tour_utils.js index ddf5089442c..351e1d12ecf 100644 --- a/addons/website/static/src/js/tours/tour_utils.js +++ b/addons/website/static/src/js/tours/tour_utils.js @@ -55,6 +55,7 @@ function changeColumnSize(position = "right") { function changeIcon(snippet, index = 0, position = "bottom") { return { trigger: `#wrapwrap .${snippet.id} i:eq(${index})`, + extra_trigger: "body.editor_enable", content: _t("Double click on an icon to change it with one of your choice."), position: position, run: "dblclick", @@ -64,6 +65,7 @@ function changeIcon(snippet, index = 0, position = "bottom") { function changeImage(snippet, position = "bottom") { return { trigger: snippet.id ? `#wrapwrap .${snippet.id} img` : snippet, + extra_trigger: "body.editor_enable", content: _t("Double click on an image to change it with one of your choice."), position: position, run: "dblclick", @@ -130,6 +132,7 @@ function clickOnEdit(position = "bottom") { function clickOnSnippet(snippet, position = "bottom") { return { trigger: snippet.id ? `#wrapwrap .${snippet.id}` : snippet, + extra_trigger: "body.editor_enable", content: _t("Click on a snippet to access its options menu."), position: position, run: "click", @@ -158,6 +161,7 @@ function clickOnSave(position = "bottom") { function clickOnText(snippet, element, position = "bottom") { return { trigger: snippet.id ? `#wrapwrap .${snippet.id} ${element}` : snippet, + extra_trigger: "body.editor_enable", content: _t("Click on a text to start editing it."), position: position, run: "text",