diff --git a/addons/account/static/src/js/tours/account.js b/addons/account/static/src/js/tours/account.js
index e854f1c3bd0..8410249f275 100644
--- a/addons/account/static/src/js/tours/account.js
+++ b/addons/account/static/src/js/tours/account.js
@@ -2,6 +2,7 @@ odoo.define('account.tour', function(require) {
"use strict";
var core = require('web.core');
+const {Markup} = require('web.utils');
var tour = require('web_tour.tour');
var _t = core._t;
@@ -36,7 +37,7 @@ tour.register('account_tour', {
}, {
trigger: "div[name=partner_id] input",
extra_trigger: "[name=move_type][raw-value=out_invoice]",
- content: _t("Write a company name to create one or see suggestions."),
+ content: Markup(_t("Write a company name to create one or see suggestions.")),
position: "bottom",
}, {
trigger: ".o_m2o_dropdown_option a:contains('Create')",
@@ -46,7 +47,7 @@ tour.register('account_tour', {
}, {
trigger: ".modal-content button.btn-primary",
extra_trigger: "[name=move_type][raw-value=out_invoice]",
- content: _t("Once everything is set, you are good to continue. You will be able to edit this later in the Customers menu."),
+ content: Markup(_t("Once everything is set, you are good to continue. You will be able to edit this later in the Customers menu.")),
auto: true,
}, {
trigger: "div[name=invoice_line_ids] .o_field_x2many_list_row_add a:not([data-context])",
@@ -74,7 +75,7 @@ tour.register('account_tour', {
}, {
trigger: "input[name=email]",
extra_trigger: "[name=move_type][raw-value=out_invoice]",
- content: _t("Write here your own email address to test the flow."),
+ content: Markup(_t("Write here your own email address to test the flow.")),
run: 'text customer@example.com',
auto: true,
}, {
diff --git a/addons/crm/static/src/js/tours/crm.js b/addons/crm/static/src/js/tours/crm.js
index 8c2e13506fb..12893ba0f15 100644
--- a/addons/crm/static/src/js/tours/crm.js
+++ b/addons/crm/static/src/js/tours/crm.js
@@ -2,6 +2,7 @@ odoo.define('crm.tour', function(require) {
"use strict";
var core = require('web.core');
+const {Markup} = require('web.utils');
var tour = require('web_tour.tour');
var _t = core._t;
@@ -12,22 +13,22 @@ tour.register('crm_tour', {
sequence: 10,
}, [tour.stepUtils.showAppsMenuItem(), {
trigger: '.o_app[data-menu-xmlid="crm.crm_menu_root"]',
- content: _t('Ready to boost your sales? Let\'s have a look at your Pipeline.'),
+ content: Markup(_t('Ready to boost your sales? Let\'s have a look at your Pipeline.')),
position: 'bottom',
edition: 'community',
}, {
trigger: '.o_app[data-menu-xmlid="crm.crm_menu_root"]',
- content: _t('Ready to boost your sales? Let\'s have a look at your Pipeline.'),
+ content: Markup(_t('Ready to boost your sales? Let\'s have a look at your Pipeline.')),
position: 'bottom',
edition: 'enterprise',
}, {
trigger: '.o-kanban-button-new',
extra_trigger: '.o_opportunity_kanban',
- content: _t("Create your first opportunity."),
+ content: Markup(_t("Create your first opportunity.")),
position: 'bottom',
}, {
trigger: ".o_kanban_quick_create .o_field_widget[name='partner_id']",
- content: _t('Write a few letters to look for a company, or create a new one.'),
+ content: Markup(_t('Write a few letters to look for a company, or create a new one.')),
position: "top",
run: function (actions) {
actions.text("Brandon Freeman", this.$anchor.find("input"));
@@ -38,28 +39,28 @@ tour.register('crm_tour', {
in_modal: false,
}, {
trigger: ".o_kanban_quick_create .o_kanban_add",
- content: _t("Now, add your Opportunity to your Pipeline."),
+ content: Markup(_t("Now, add your Opportunity to your Pipeline.")),
position: "bottom",
}, {
trigger: ".o_opportunity_kanban .o_kanban_group:first-child .o_kanban_record:last-child .oe_kanban_content",
extra_trigger: ".o_opportunity_kanban",
- content: _t("Drag & drop opportunities between columns as you progress in your sales cycle."),
+ content: Markup(_t("Drag & drop opportunities between columns as you progress in your sales cycle.")),
position: "right",
run: "drag_and_drop .o_opportunity_kanban .o_kanban_group:eq(2) ",
}, {
trigger: ".o_kanban_record:not(.o_updating) .o_activity_color_default",
extra_trigger: ".o_opportunity_kanban",
- content: _t("Looks like nothing is planned. :(
Tip : Schedule activities to keep track of everything you have to do!"),
+ content: Markup(_t("Looks like nothing is planned. :(
Tip : Schedule activities to keep track of everything you have to do!")),
position: "bottom",
}, {
trigger: ".o_schedule_activity",
extra_trigger: ".o_opportunity_kanban",
- content: _t("Let's Schedule an Activity."),
+ content: Markup(_t("Let's Schedule an Activity.")),
position: "bottom",
width: 200,
}, {
trigger: '.modal-footer button[name="action_close_dialog"]',
- content: _t("All set. Let’s Schedule it."),
+ content: Markup(_t("All set. Let’s Schedule it.")),
position: "top", // dot NOT move to bottom, it would cause a resize flicker, see task-2476595
run: function (actions) {
actions.auto('.modal-footer button[special=cancel]');
@@ -67,7 +68,7 @@ tour.register('crm_tour', {
}, {
id: "drag_opportunity_to_won_step",
trigger: ".o_opportunity_kanban .o_kanban_record:last-child",
- content: _t("Drag your opportunity to Won when you get the deal. Congrats !"),
+ content: Markup(_t("Drag your opportunity to Won when you get the deal. Congrats !")),
position: "bottom",
run: "drag_and_drop .o_opportunity_kanban .o_kanban_group:eq(3) ",
}, {
diff --git a/addons/crm_iap_lead/static/src/js/tours/crm_iap_lead.js b/addons/crm_iap_lead/static/src/js/tours/crm_iap_lead.js
index 577b6cd14d9..8d9b913645b 100644
--- a/addons/crm_iap_lead/static/src/js/tours/crm_iap_lead.js
+++ b/addons/crm_iap_lead/static/src/js/tours/crm_iap_lead.js
@@ -2,6 +2,7 @@ odoo.define('crm_iap_lead.generate_leads_steps', function (require) {
"use strict";
var tour = require('web_tour.tour');
+const {Markup} = require('web.utils');
var core = require('web.core');
require('crm.tour');
@@ -20,7 +21,7 @@ tour.tours.crm_tour.steps.splice(DragOppToWonStepIndex + 1, 0, {
*
*/
trigger: ".o_button_generate_leads",
- content: _t("Looking for more opportunities ?
Try the Lead Generation tool."),
+ content: Markup(_t("Looking for more opportunities ?
Try the Lead Generation tool.")),
position: "bottom",
run: function (actions) {
actions.auto('.o_button_generate_leads');
@@ -38,4 +39,4 @@ tour.tours.crm_tour.steps.splice(DragOppToWonStepIndex + 1, 0, {
}
});
-});
\ No newline at end of file
+});
diff --git a/addons/event/static/src/js/tours/event_tour.js b/addons/event/static/src/js/tours/event_tour.js
index d336729357e..88caff125db 100644
--- a/addons/event/static/src/js/tours/event_tour.js
+++ b/addons/event/static/src/js/tours/event_tour.js
@@ -18,8 +18,8 @@ return EventAdditionalTourSteps;
odoo.define('event.event_tour', function (require) {
"use strict";
-var core = require('web.core');
-var _t = core._t;
+const {_t} = require('web.core');
+const {Markup} = require('web.utils');
var tour = require('web_tour.tour');
var EventAdditionalTourSteps = require('event.event_steps');
@@ -30,33 +30,33 @@ tour.register('event_tour', {
sequence: 210,
}, [tour.stepUtils.showAppsMenuItem(), {
trigger: '.o_app[data-menu-xmlid="event.event_main_menu"]',
- content: _t("Ready to organize events in a few minutes? Let's get started!"),
+ content: Markup(_t("Ready to organize events in a few minutes? Let's get started!")),
position: 'bottom',
edition: 'enterprise',
}, {
trigger: '.o_app[data-menu-xmlid="event.event_main_menu"]',
- content: _t("Ready to organize events in a few minutes? Let's get started!"),
+ content: Markup(_t("Ready to organize events in a few minutes? Let's get started!")),
edition: 'community',
}, {
trigger: '.o-kanban-button-new',
extra_trigger: '.o_event_kanban_view',
- content: _t("Let's create your first event."),
+ content: Markup(_t("Let's create your first event.")),
position: 'bottom',
width: 175,
}, {
trigger: '.o_event_form_view input[name="name"]',
- content: _t("This is the name your guests will see when registering."),
+ content: Markup(_t("This is the name your guests will see when registering.")),
run: 'text Odoo Experience 2020',
}, {
trigger: '.o_event_form_view input[name="date_end"]',
- content: _t("When will your event take place? Select the start and end dates and click Apply."),
+ content: Markup(_t("When will your event take place? Select the start and end dates and click Apply.")),
run: function () {
$('input[name="date_begin"]').val('09/30/2020 08:00:00').change();
$('input[name="date_end"]').val('10/02/2020 23:00:00').change();
},
}, {
trigger: '.o_event_form_view div[name="event_ticket_ids"] .o_field_x2many_list_row_add a',
- content: _t("Ticket types allow you to distinguish your attendees. Let's create a new one."),
+ content: Markup(_t("Ticket types allow you to distinguish your attendees. Let's create a new one.")),
}, ...new EventAdditionalTourSteps()._get_website_event_steps(), {
trigger: '.o_event_form_view div[name="stage_id"]',
extra_trigger: 'div.o_form_buttons_view:not(.o_hidden)',
@@ -65,7 +65,7 @@ tour.register('event_tour', {
}, {
trigger: 'ol.breadcrumb li.breadcrumb-item:first',
extra_trigger: '.o_event_form_view div[name="stage_id"]',
- content: _t("Use the breadcrumbs to go back to your kanban overview."),
+ content: Markup(_t("Use the breadcrumbs to go back to your kanban overview.")),
position: 'bottom',
run: 'click',
}].filter(Boolean));
diff --git a/addons/hr_expense/static/src/js/tours/hr_expense.js b/addons/hr_expense/static/src/js/tours/hr_expense.js
index 66662f601b2..b8200677c51 100644
--- a/addons/hr_expense/static/src/js/tours/hr_expense.js
+++ b/addons/hr_expense/static/src/js/tours/hr_expense.js
@@ -1,11 +1,10 @@
odoo.define('hr_expense.tour', function(require) {
"use strict";
-var core = require('web.core');
+const {_t} = require('web.core');
+const {Markup} = require('web.utils');
var tour = require('web_tour.tour');
-var _t = core._t;
-
tour.register('hr_expense_tour' , {
url: "/web"
}, [tour.stepUtils.showAppsMenuItem(), {
@@ -20,7 +19,7 @@ tour.register('hr_expense_tour' , {
edition: 'enterprise'
}, {
trigger: '.o_form_button_save',
- content: _t("
Once your Expense is ready, you can save it.
"), + content: Markup(_t("Once your Expense is ready, you can save it.
")), position: 'bottom', }, { trigger: '.o_attach_document', @@ -29,28 +28,28 @@ tour.register('hr_expense_tour' , { }, { trigger: '.o_expense_submit', extra_triggger: ".o_expense_form", - content: _t('Click on Create Report to create the report.
'), + content: Markup(_t('Click on Create Report to create the report.
')), position: 'right', }, { trigger: '.o_expense_tree input[type=checkbox]', - content: _t('Select expenses to submit them to your manager
'), + content: Markup(_t('Select expenses to submit them to your manager
')), position: 'bottom' }, { trigger: '.o_dropdown_toggler', extra_trigger: ".o_expense_tree", - content: _t('Click on Action Create Report to submit selected expenses to your manager
'), + content: Markup(_t('Click on Action Create Report to submit selected expenses to your manager
')), position: 'right', }, { trigger: '.o_expense_sheet_submit', - content: _t('Once your Expense report is ready, you can submit it to your manager and wait for the approval from your manager.'), + content: Markup(_t('Once your Expense report is ready, you can submit it to your manager and wait for the approval from your manager.')), position: 'bottom', }, { trigger: '.o_expense_sheet_approve', - content: _t("Approve the report here.
Tip: if you refuse, don’t forget to give the reason thanks to the hereunder message tool
"), + content: Markup(_t("Approve the report here.
Tip: if you refuse, don’t forget to give the reason thanks to the hereunder message tool
")), position: 'bottom', }, { trigger: '.o_expense_sheet_post', - content: _t("The accountant receive approved expense reports.
He can post journal entries in one click if taxes and accounts are right.
"), + content: Markup(_t("The accountant receive approved expense reports.
He can post journal entries in one click if taxes and accounts are right.
")), position: 'bottom', }, { trigger: '.o_expense_sheet_pay', diff --git a/addons/hr_recruitment/static/src/js/tours/hr_recruitment.js b/addons/hr_recruitment/static/src/js/tours/hr_recruitment.js index e2bb77bfe61..0b2874f5fd4 100644 --- a/addons/hr_recruitment/static/src/js/tours/hr_recruitment.js +++ b/addons/hr_recruitment/static/src/js/tours/hr_recruitment.js @@ -1,11 +1,10 @@ odoo.define('hr_recruitment.tour', function(require) { "use strict"; -var core = require('web.core'); +const {_t} = require('web.core'); +const {Markup} = require('web.utils'); var tour = require('web_tour.tour'); -var _t = core._t; - tour.register('hr_recruitment_tour',{ url: "/web", rainbowManMessage: _t("Channels make it easy to organize information across different topics and groups.
Try to create your first channel (e.g. sales, marketing, product XYZ, after work party, etc).
"), + content: Markup(_t("Channels make it easy to organize information across different topics and groups.
Try to create your first channel (e.g. sales, marketing, product XYZ, after work party, etc).
")), position: 'bottom', }, { trigger: '.o_DiscussSidebar_itemNewInput', - content: _t("Create a channel here.
"), + content: Markup(_t("Create a channel here.
")), position: 'bottom', auto: true, run: function (actions) { @@ -23,14 +22,14 @@ tour.register('mail_tour', { }, }, { trigger: ".o_DiscussSidebar_newChannelAutocompleteSuggestions", - content: _t("Create a public or private channel.
"), + content: Markup(_t("Create a public or private channel.
")), position: 'right', run() { this.$consumeEventAnchors.find('li:first').click(); }, }, { trigger: '.o_Discuss_thread .o_ComposerTextInput_textarea', - content: _t("Write a message to the members of the channel here.
You can notify someone with '@' or link another channel with '#'. Start your message with '/' to get the list of possible commands.
"), + content: Markup(_t("Write a message to the members of the channel here.
You can notify someone with '@' or link another channel with '#'. Start your message with '/' to get the list of possible commands.
")), position: "top", width: 350, run: function (actions) { @@ -43,7 +42,7 @@ tour.register('mail_tour', { position: "top", }, { trigger: '.o_Discuss_thread .o_Message_commandStar', - content: _t("Messages can be starred to remind you to check back later."), + content: Markup(_t("Messages can be starred to remind you to check back later.")), position: "bottom", }, { trigger: '.o_DiscussSidebarItem.o-starred-box', @@ -51,6 +50,6 @@ tour.register('mail_tour', { position: "bottom", }, { trigger: '.o_DiscussSidebar_groupChat .o_DiscussSidebar_groupHeaderItemAdd', - content: _t("Chat with coworkers in real-time using direct messages.
You might need to invite users from the Settings app first.
"), + content: Markup(_t("Chat with coworkers in real-time using direct messages.
You might need to invite users from the Settings app first.
")), position: 'bottom', }]); diff --git a/addons/mass_mailing/static/src/js/tours/mass_mailing_tour.js b/addons/mass_mailing/static/src/js/tours/mass_mailing_tour.js index 47dad7b1b24..b9189c261a3 100644 --- a/addons/mass_mailing/static/src/js/tours/mass_mailing_tour.js +++ b/addons/mass_mailing/static/src/js/tours/mass_mailing_tour.js @@ -1,8 +1,8 @@ odoo.define('mass_mailing.mass_mailing_tour', function (require) { "use strict"; - var core = require('web.core'); - var _t = core._t; + const {_t} = require('web.core'); + const {Markup} = require('web.utils'); var tour = require('web_tour.tour'); var now = moment(); @@ -22,11 +22,11 @@ odoo.define('mass_mailing.mass_mailing_tour', function (require) { edition: 'community', }, { trigger: '.o-kanban-button-new', - content: _t("Start by creating your first Mailing."), + content: Markup(_t("Start by creating your first Mailing.")), position: 'bottom', }, { trigger: 'input[name="subject"]', - content: _t('Pick the email subject.'), + content: Markup(_t('Pick the email subject.')), position: 'right', run: 'text ' + now.format("MMMM") + " Newsletter", }, { @@ -39,13 +39,13 @@ odoo.define('mass_mailing.mass_mailing_tour', function (require) { auto: true, }, { trigger: 'div[name="body_arch"] iframe #newsletter', - content: _t('Choose this theme.'), + content: Markup(_t('Choose this theme.')), position: 'left', edition: 'enterprise', run: 'click', }, { trigger: 'div[name="body_arch"] iframe #default', - content: _t('Choose this theme.'), + content: Markup(_t('Choose this theme.')), position: 'right', edition: 'community', run: 'click', @@ -80,7 +80,7 @@ odoo.define('mass_mailing.mass_mailing_tour', function (require) { run: "click", }, { trigger: '.o_back_button', - content: _t("By using the Breadcrumb, you can navigate back to the overview."), + content: Markup(_t("By using the Breadcrumb, you can navigate back to the overview.")), position: 'bottom', run: 'click', }] diff --git a/addons/point_of_sale/static/src/js/tours/point_of_sale.js b/addons/point_of_sale/static/src/js/tours/point_of_sale.js index 49a6fc0ac3e..37bc8736206 100644 --- a/addons/point_of_sale/static/src/js/tours/point_of_sale.js +++ b/addons/point_of_sale/static/src/js/tours/point_of_sale.js @@ -1,30 +1,29 @@ odoo.define('point_of_sale.tour', function(require) { "use strict"; -var core = require('web.core'); +const {_t} = require('web.core'); +const {Markup} = require('web.utils'); var tour = require('web_tour.tour'); -var _t = core._t; - tour.register('point_of_sale_tour', { url: "/web", rainbowMan: false, sequence: 45, }, [tour.stepUtils.showAppsMenuItem(), { trigger: '.o_app[data-menu-xmlid="point_of_sale.menu_point_root"]', - content: _t("Ready to launch your point of sale?"), + content: Markup(_t("Ready to launch your point of sale?")), width: 215, position: 'right', edition: 'community' }, { trigger: '.o_app[data-menu-xmlid="point_of_sale.menu_point_root"]', - content: _t("Ready to launch your point of sale?"), + content: Markup(_t("Ready to launch your point of sale?")), width: 215, position: 'bottom', edition: 'enterprise' }, { trigger: ".o_pos_kanban button.oe_kanban_action_button", - content: _t("Ready to have a look at the POS Interface? Let's start our first session.
"), + content: Markup(_t("Ready to have a look at the POS Interface? Let's start our first session.
")), position: "bottom" }]); diff --git a/addons/project/static/src/js/tours/project.js b/addons/project/static/src/js/tours/project.js index a0984eff0c8..c90d2eab0bb 100644 --- a/addons/project/static/src/js/tours/project.js +++ b/addons/project/static/src/js/tours/project.js @@ -1,46 +1,45 @@ odoo.define('project.tour', function(require) { "use strict"; -var core = require('web.core'); +const {_t} = require('web.core'); +const {Markup} = require('web.utils'); var tour = require('web_tour.tour'); -var _t = core._t; - tour.register('project_tour', { sequence: 110, url: "/web", rainbowManMessage: "Congratulations, you are now a master of project management.", }, [tour.stepUtils.showAppsMenuItem(), { trigger: '.o_app[data-menu-xmlid="project.menu_main_pm"]', - content: _t('Want a better way to manage your projects? It starts here.'), + content: Markup(_t('Want a better way to manage your projects? It starts here.')), position: 'right', edition: 'community', }, { trigger: '.o_app[data-menu-xmlid="project.menu_main_pm"]', - content: _t('Want a better way to manage your projects? It starts here.'), + content: Markup(_t('Want a better way to manage your projects? It starts here.')), position: 'bottom', edition: 'enterprise', }, { trigger: '.o-kanban-button-new', extra_trigger: '.o_project_kanban', - content: _t('Let\'s create your first project.'), + content: Markup(_t('Let\'s create your first project.')), position: 'bottom', width: 200, }, { trigger: 'input.o_project_name', - content: _t('Choose a name for your project. It can be anything you want: the name of a customer,\ - of a product, of a team, of a construction site, etc.'), + content: Markup(_t('Choose a name for your project. It can be anything you want: the name of a customer,\ + of a product, of a team, of a construction site, etc.')), position: 'right', }, { trigger: '.o_open_tasks', - content: _t('Let\'s create your first project.'), + content: Markup(_t('Let\'s create your first project.')), position: 'top', run: function (actions) { actions.auto('.modal:visible .btn.btn-primary'); }, }, { trigger: ".o_kanban_project_tasks .o_column_quick_create .input-group", - content: _t("Add columns to organize your tasks into stages e.g. New - In Progress - Done."), + content: Markup(_t("Add columns to organize your tasks into stages e.g. New - In Progress - Done.")), position: 'right', run: function (actions) { actions.text("Test", this.$anchor.find("input")); @@ -51,7 +50,7 @@ tour.register('project_tour', { }, { trigger: ".o_kanban_project_tasks .o_column_quick_create .input-group", extra_trigger: '.o_kanban_group', - content: _t("Add columns to organize your tasks into stages e.g. New - In Progress - Done."), + content: Markup(_t("Add columns to organize your tasks into stages e.g. New - In Progress - Done.")), position: 'right', run: function (actions) { actions.text("Test", this.$anchor.find("input")); @@ -62,13 +61,13 @@ tour.register('project_tour', { }, { trigger: '.o-kanban-button-new', extra_trigger: '.o_kanban_group:eq(1)', - content: _t("Let's create your first task."), + content: Markup(_t("Let's create your first task.")), position: 'bottom', width: 200, }, { trigger: '.o_kanban_quick_create input.o_field_char[name=name]', extra_trigger: '.o_kanban_project_tasks', - content: _t('Choose a task name (e.g. Website Design, Purchase Goods...)'), + content: Markup(_t('Choose a task name (e.g. Website Design, Purchase Goods...)')), position: 'right', }, { trigger: '.o_kanban_quick_create .o_kanban_add', @@ -78,7 +77,7 @@ tour.register('project_tour', { }, { trigger: ".o_kanban_record .oe_kanban_content", extra_trigger: '.o_kanban_project_tasks', - content: _t("Drag & drop the card to change your task from stage."), + content: Markup(_t("Drag & drop the card to change your task from stage.")), position: "bottom", run: "drag_and_drop .o_kanban_group:eq(1) ", }, { @@ -88,20 +87,20 @@ tour.register('project_tour', { position: "bottom", }, { trigger: ".o_ChatterTopbar_buttonSendMessage", - content: _t("Use the chatter to send emails and communicate efficiently with your customers. \ - Add new people to the followers' list to make them aware of the main changes about this task."), + content: Markup(_t("Use the chatter to send emails and communicate efficiently with your customers. \ + Add new people to the followers' list to make them aware of the main changes about this task.")), width: 350, position: "bottom", }, { trigger: ".o_ChatterTopbar_buttonLogNote", - content: _t("Log notes for internal communications (the people following this task won't be notified \ + content: Markup(_t("Log notes for internal communications (the people following this task won't be notified \ of the note you are logging unless you specifically tag them). Use @ mentions to ping a colleague \ - or # mentions to reach an entire team."), + or # mentions to reach an entire team.")), width: 350, position: "bottom" }, { trigger: ".o_ChatterTopbar_buttonScheduleActivity", - content: _t("Use activities to organize your daily work."), + content: Markup(_t("Use activities to organize your daily work.")), }, { trigger: ".modal-dialog .btn-primary", content: "Schedule your activity once it is ready.", @@ -110,7 +109,7 @@ tour.register('project_tour', { }, { trigger: ".breadcrumb-item:not(.active):last", extra_trigger: '.o_form_project_tasks.o_form_readonly', - content: _t("Let's go back to the kanban view to have an overview of your next tasks."), + content: Markup(_t("Let's go back to the kanban view to have an overview of your next tasks.")), position: "right", run: 'click', }]); diff --git a/addons/sale/static/src/js/tours/sale.js b/addons/sale/static/src/js/tours/sale.js index d01b0ad6837..9c603aed152 100644 --- a/addons/sale/static/src/js/tours/sale.js +++ b/addons/sale/static/src/js/tours/sale.js @@ -1,11 +1,10 @@ odoo.define('sale.tour', function(require) { "use strict"; -var core = require('web.core'); +const {_t} = require('web.core'); +const {Markup} = require('web.utils'); var tour = require('web_tour.tour'); -var _t = core._t; - tour.register("sale_tour", { url: "/web", rainbowMan: false, @@ -108,11 +107,11 @@ tour.register("sale_quote_tour", { }, { trigger: ".o_field_widget[name='price_unit'] ", extra_trigger: ".o_sale_order", - content: _t("Set a price."), + content: Markup(_t("Set a price.")), position: "right", run: "text 10.0" }, - ...tour.stepUtils.statusbarButtonsSteps("Send by Email", _t("Send the quote to yourself and check what the customer will receive."), ".o_statusbar_buttons button[name='action_quotation_send']"), + ...tour.stepUtils.statusbarButtonsSteps("Send by Email", Markup(_t("Send the quote to yourself and check what the customer will receive.")), ".o_statusbar_buttons button[name='action_quotation_send']"), { trigger: ".modal-footer button.btn-primary", auto: true, diff --git a/addons/sale_timesheet/static/tests/tours/sale_timesheet_tour.js b/addons/sale_timesheet/static/tests/tours/sale_timesheet_tour.js index 3cc9f39c46a..a51a39d81f4 100644 --- a/addons/sale_timesheet/static/tests/tours/sale_timesheet_tour.js +++ b/addons/sale_timesheet/static/tests/tours/sale_timesheet_tour.js @@ -1,6 +1,7 @@ odoo.define('sale_timesheet.tour', function (require) { "use strict"; +const {Markup} = require('web.utils'); const tour = require('web_tour.tour'); tour.register('sale_timesheet_tour', { @@ -28,7 +29,7 @@ tour.register('sale_timesheet_tour', { run: 'click', }, { trigger: '.o_field_widget[name="product_id"], .o_field_widget[name="product_template_id"]', - content: 'Select a prepaid service product (e.g. Service Product (Prepaid Hours))', + content: Markup('Select a prepaid service product (e.g. Service Product (Prepaid Hours))'), run: function (actions) { actions.text('Service Product (Prepaid Hours)', this.$anchor.find('input')); }, @@ -91,7 +92,7 @@ tour.register('sale_timesheet_tour', { run: 'click', }, { trigger: 'div[name="partner_id"]', - content: 'Select the customer of your Sales Order (e.g. Brandon Freeman). Since we have a Sales Order for this customer with a prepaid service product which the remaining hours to deliver is greater than 0, the Sales Order Item in the task should be contain the Sales Order Item containing this prepaid service product.', + content: Markup('Select the customer of your Sales Order (e.g. Brandon Freeman). Since we have a Sales Order for this customer with a prepaid service product which the remaining hours to deliver is greater than 0, the Sales Order Item in the task should be contain the Sales Order Item containing this prepaid service product.'), run: function (actions) { actions.text('Brandon Freeman', this.$anchor.find('input')); }, @@ -186,7 +187,7 @@ tour.register('sale_timesheet_tour', { }, }, { trigger: 'div[name="partner_id"]', - content: 'Add the customer for this project to select an SO and SOL for this customer (e.g. Brandon Freeman).', + content: Markup('Add the customer for this project to select an SO and SOL for this customer (e.g. Brandon Freeman).'), run: function (actions) { actions.text('Azure Interior, Brandon Freeman', this.$anchor.find('input')); }, diff --git a/addons/web_tour/static/src/js/tour_manager.js b/addons/web_tour/static/src/js/tour_manager.js index d85a89e426f..e8e8e0f3497 100644 --- a/addons/web_tour/static/src/js/tour_manager.js +++ b/addons/web_tour/static/src/js/tour_manager.js @@ -11,6 +11,7 @@ var RunningTourActionHelper = require('web_tour.RunningTourActionHelper'); var ServicesMixin = require('web.ServicesMixin'); var session = require('web.session'); var Tip = require('web_tour.Tip'); +const {Markup} = require('web.utils'); var _t = core._t; @@ -92,7 +93,7 @@ return core.Class.extend(mixins.EventDispatcherMixin, ServicesMixin, { wait_for: options.wait_for || Promise.resolve(), }; if (options.skip_enabled) { - tour.skip_link = '' + _t('Skip tour') + '
'; + tour.skip_link = Markup`${_t('Skip tour')}
`; tour.skip_handler = function (tip) { this._deactivate_tip(tip); this._consume_tour(name); @@ -353,7 +354,7 @@ return core.Class.extend(mixins.EventDispatcherMixin, ServicesMixin, { var tip_info = tip; if (tour.skip_link) { tip_info = _.extend(_.omit(tip_info, 'content'), { - content: tip.content + tour.skip_link, + content: Markup`${tip.content}${tour.skip_link}`, event_handlers: [{ event: 'click', selector: '.o_skip_tour', diff --git a/addons/web_tour/static/src/js/tour_step_utils.js b/addons/web_tour/static/src/js/tour_step_utils.js index f2b6f3930ec..866c804cf94 100644 --- a/addons/web_tour/static/src/js/tour_step_utils.js +++ b/addons/web_tour/static/src/js/tour_step_utils.js @@ -1,10 +1,10 @@ odoo.define('web_tour.TourStepUtils', function (require) { 'use strict'; -const core = require('web.core'); -const _t = core._t; +const {_t, Class} = require('web.core'); +const {Markup} = require('web.utils'); -return core.Class.extend({ +return Class.extend({ _getHelpMessage: (functionName, ...args) => `Generated by function tour utils ${functionName}(${args.join(', ')})`, addDebugHelp: helpMessage => step => { @@ -39,7 +39,7 @@ return core.Class.extend({ return { edition: 'enterprise', trigger: '.o_main_navbar .o_menu_toggle', - content: _t('Click on the Home icon to navigate across apps.'), + content: Markup(_t('Click on the Home icon to navigate across apps.')), position: 'bottom', }; }, diff --git a/addons/web_tour/static/src/xml/tip.xml b/addons/web_tour/static/src/xml/tip.xml index eba661f65ca..6516fafbfa7 100644 --- a/addons/web_tour/static/src/xml/tip.xml +++ b/addons/web_tour/static/src/xml/tip.xml @@ -3,7 +3,7 @@Create a quotation
')), +...tour.stepUtils.statusbarButtonsSteps('New Quotation', Markup(_t('Create a quotation
'))), { mobile: false, trigger: ".o_field_widget[name=order_line] .o_field_x2many_list_row_add > a", @@ -637,11 +638,11 @@ tour.stepUtils.autoExpandMoreButtons('.o_form_readonly'), content: _t("Try to send it to email"), position: "bottom", }, -...tour.stepUtils.statusbarButtonsSteps('Confirm', _t("Confirm this quotation
")), +...tour.stepUtils.statusbarButtonsSteps('Confirm', Markup(_t("Confirm this quotation
"))), { trigger: ".o_form_button_save", extra_trigger: ".o_statusbar_status .btn-primary:contains('Sales Order')", - content: _t("Save this quotation
"), + content: Markup(_t("Save this quotation
")), position: "bottom" // Reordering rule }, { @@ -719,12 +720,12 @@ tour.stepUtils.openBuggerMenu("li.breadcrumb-item.active:contains('Inventory Ove }, { mobile: false, trigger: ".o_list_button_save", - content: _t("Save this reordering rule
"), + content: Markup(_t("Save this reordering rule
")), position: "bottom" }, { mobile: true, trigger: ".o_form_button_save", - content: _t("Save this reordering rule
"), + content: Markup(_t("Save this reordering rule
")), position: "bottom" }, tour.stepUtils.openBuggerMenu("li.breadcrumb-item.active:contains('OP/')"), @@ -848,7 +849,7 @@ tour.stepUtils.openBuggerMenu("li.breadcrumb-item.active:contains('Manufacturing content: _t('Go back to the home menu'), position: 'bottom', }, -...tour.stepUtils.goToAppSteps('sale.sale_menu_root', _t('Organize your sales activities with the Sales app.')), +...tour.stepUtils.goToAppSteps('sale.sale_menu_root', Markup(_t('Organize your sales activities with the Sales app.'))), tour.stepUtils.openBuggerMenu("li.breadcrumb-item.active:contains('Quotations')"), { trigger: ".o_menu_sections button[data-menu-xmlid='sale.sale_order_menu']", @@ -1031,12 +1032,12 @@ tour.stepUtils.mobileModifier(tour.stepUtils.autoExpandMoreButtons('.o_control_p { edition: "enterprise", trigger: "button.o_reconcile, button.o_validate", - content: _t('Click on Reconcile
'), + content: Markup(_t('Click on Reconcile
')), position: "right", }, { edition: "enterprise", trigger: ".button_back_to_statement", - content: _t('Close this statement.
'), + content: Markup(_t('Close this statement.
')), position: "bottom", }]); });