diff --git a/addons/crm/static/src/js/tour.js b/addons/crm/static/src/js/tour.js index 79b1b265ba0..a60b2484439 100644 --- a/addons/crm/static/src/js/tour.js +++ b/addons/crm/static/src/js/tour.js @@ -8,10 +8,16 @@ var _t = core._t; tour.register('crm_tour', { url: "/web", -}, [tour.STEPS.MENU_MORE, { - trigger: '.o_app[data-menu-xmlid="crm.crm_menu_root"], .oe_menu_toggler[data-menu-xmlid="crm.crm_menu_root"]', +}, [tour.STEPS.SHOW_APPS_MENU_ITEM, { + trigger: '.o_app[data-menu-xmlid="crm.crm_menu_root"]', + content: _t("Ready to boost your sales? Your Pipeline can be found here, under the CRM app."), + position: 'right', + edition: 'community' +}, { + trigger: '.o_app[data-menu-xmlid="crm.crm_menu_root"]', content: _t("Ready to boost your sales? Your Pipeline can be found here, under the CRM app."), position: 'bottom', + edition: 'enterprise', }, { trigger: ".o-kanban-button-new", extra_trigger: '.o_opportunity_kanban', @@ -65,20 +71,30 @@ tour.register('crm_tour', { extra_trigger: '.o_opportunity_form', content: _t("Use the breadcrumbs to go back to your sales pipeline."), position: "bottom" -}, tour.STEPS.TOGGLE_HOME_MENU, -tour.STEPS.MENU_MORE, { - trigger: '.o_app[data-menu-xmlid="base.menu_administration"], .oe_menu_toggler[data-menu-xmlid="base.menu_administration"]', +}, tour.STEPS.TOGGLE_HOME_MENU, tour.STEPS.SHOW_APPS_MENU_ITEM, { + trigger: '.o_app[data-menu-xmlid="base.menu_administration"]', content: _t("Configuration options are available in the Settings app."), - position: "bottom" + position: "bottom", + edition: 'community' +}, { + trigger: '.o_app[data-menu-xmlid="base.menu_administration"]', + content: _t("Configuration options are available in the Settings app."), + position: "bottom", + edition: 'enterprise' }, { trigger: ".o_web_settings_dashboard .o_user_emails", content: _t("Invite coworkers via email.
Enter one email per line."), position: "right" -}, tour.STEPS.TOGGLE_HOME_MENU, -tour.STEPS.MENU_MORE, { - trigger: '.o_app[data-menu-xmlid="crm.crm_menu_root"], .oe_menu_toggler[data-menu-xmlid="crm.crm_menu_root"]', +}, tour.STEPS.TOGGLE_HOME_MENU, tour.STEPS.SHOW_APPS_MENU_ITEM, { + trigger: '.o_app[data-menu-xmlid="crm.crm_menu_root"]', + content: _t("Good job! You completed the tour of the CRM app."), + position: 'right', + edition: 'community' +}, { + trigger: '.o_app[data-menu-xmlid="crm.crm_menu_root"]', content: _t("Good job! You completed the tour of the CRM app."), position: 'bottom', + edition: 'enterprise' }]); }); diff --git a/addons/hr_expense/static/src/js/tour.js b/addons/hr_expense/static/src/js/tour.js index fdb149f837d..eddc613b1ce 100644 --- a/addons/hr_expense/static/src/js/tour.js +++ b/addons/hr_expense/static/src/js/tour.js @@ -6,15 +6,18 @@ var tour = require('web_tour.tour'); var _t = core._t; -tour.register('hr_expense_tour' , -{ +tour.register('hr_expense_tour' , { url: "/web" -}, -[tour.STEPS.MENU_MORE, -{ - trigger: '.o_app[data-menu-xmlid="hr_expense.menu_hr_expense_root"], .oe_menu_toggler[data-menu-xmlid="hr_expense.menu_hr_expense_root"]', +}, [tour.STEPS.SHOW_APPS_MENU_ITEM, { + trigger: '.o_app[data-menu-xmlid="hr_expense.menu_hr_expense_root"]', + content: _t("Want to manage your expenses? It starts here."), + position: 'right', + edition: 'community' +}, { + trigger: '.o_app[data-menu-xmlid="hr_expense.menu_hr_expense_root"]', content: _t("Want to manage your expenses? It starts here."), position: 'bottom', + edition: 'enterprise' }, { trigger: '.o_form_button_save', content: _t("

Once your Expense is ready, you can save it.

"), diff --git a/addons/hr_recruitment/static/src/js/tour.js b/addons/hr_recruitment/static/src/js/tour.js index 705cda3b3e8..0f814426e8b 100644 --- a/addons/hr_recruitment/static/src/js/tour.js +++ b/addons/hr_recruitment/static/src/js/tour.js @@ -6,10 +6,16 @@ var tour = require('web_tour.tour'); var _t = core._t; -tour.register('hr_recruitment_tour', [{ - trigger: '.o_app[data-menu-xmlid="hr_recruitment.menu_hr_recruitment_root"], .oe_menu_toggler[data-menu-xmlid="hr_recruitment.menu_hr_recruitment_root"]', +tour.register('hr_recruitment_tour', [tour.STEPS.SHOW_APPS_MENU_ITEM, { + trigger: '.o_app[data-menu-xmlid="hr_recruitment.menu_hr_recruitment_root"]', + content: _t('Want to start recruiting like a pro? Start here.'), + position: 'right', + edition: 'community' +}, { + trigger: '.o_app[data-menu-xmlid="hr_recruitment.menu_hr_recruitment_root"]', content: _t('Want to start recruiting like a pro? Start here.'), position: 'bottom', + edition: 'enterprise' }, { trigger: ".o-kanban-button-new", extra_trigger: '.o_hr_recruitment_kanban', diff --git a/addons/point_of_sale/static/src/js/tour.js b/addons/point_of_sale/static/src/js/tour.js index 775fe748cf1..225809819ed 100644 --- a/addons/point_of_sale/static/src/js/tour.js +++ b/addons/point_of_sale/static/src/js/tour.js @@ -9,10 +9,16 @@ var _t = core._t; tour.register('point_of_sale_tour', { url: "/web", rainbowMan: false, -}, [{ - trigger: '.o_app[data-menu-xmlid="point_of_sale.menu_point_root"], .oe_menu_toggler[data-menu-xmlid="point_of_sale.menu_point_root"]', +}, [tour.STEPS.SHOW_APPS_MENU_ITEM, { + trigger: '.o_app[data-menu-xmlid="point_of_sale.menu_point_root"]', + content: _t("Ready to launch your point of sale? Click here."), + 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? Click here."), position: 'bottom', + edition: 'enterprise' }, { trigger: ".o_pos_kanban button.oe_kanban_action_button", content: _t("

Click to start the point of sale interface. It runs on tablets, laptops, or industrial hardware.

Once the session launched, the system continues to run without an internet connection.

"), diff --git a/addons/project/static/src/js/tour.js b/addons/project/static/src/js/tour.js index 743b603228e..f8780c1f1e2 100644 --- a/addons/project/static/src/js/tour.js +++ b/addons/project/static/src/js/tour.js @@ -8,10 +8,16 @@ var _t = core._t; tour.register('project_tour', { url: "/web", -}, [tour.STEPS.MENU_MORE, { - trigger: '.o_app[data-menu-xmlid="project.menu_main_pm"], .oe_menu_toggler[data-menu-xmlid="project.menu_main_pm"]', +}, [tour.STEPS.SHOW_APPS_MENU_ITEM, { + trigger: '.o_app[data-menu-xmlid="project.menu_main_pm"]', + content: _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.'), position: 'bottom', + edition: 'enterprise', }, { trigger: '.o-kanban-button-new', extra_trigger: '.o_project_kanban', diff --git a/addons/sale/static/src/js/tour.js b/addons/sale/static/src/js/tour.js index 275f28903dc..9992cbb3a42 100644 --- a/addons/sale/static/src/js/tour.js +++ b/addons/sale/static/src/js/tour.js @@ -8,11 +8,17 @@ var _t = core._t; tour.register('sale_tour', { url: "/web", -}, [tour.STEPS.MENU_MORE, { - trigger: '.o_app[data-menu-xmlid="sale.sale_menu_root"], .oe_menu_toggler[data-menu-xmlid="sale.sale_menu_root"]', +}, [tour.STEPS.SHOW_APPS_MENU_ITEM, { + trigger: '.o_app[data-menu-xmlid="sale.sale_menu_root"]', + content: _t('Organize your sales activities with the Sales Management app.'), + position: 'right', + edition: 'community' +}, { + trigger: '.o_app[data-menu-xmlid="sale.sale_menu_root"]', content: _t('Organize your sales activities with the Sales Management app.'), position: 'bottom', -}, { + edition: 'enterprise' +}, { trigger: ".o_list_button_add", extra_trigger: ".o_sale_order", content: _t("Let's create a new quotation.
Note that colored buttons usually point to the next logical actions."), diff --git a/addons/stock/static/tests/route_tour.js b/addons/stock/static/tests/route_tour.js index e75695a5f69..4e3d305e32d 100644 --- a/addons/stock/static/tests/route_tour.js +++ b/addons/stock/static/tests/route_tour.js @@ -25,8 +25,8 @@ tour.register('stock', { }, { content: "list of product variants", - trigger: '.o_sub_menu .oe_secondary_submenu [data-menu-xmlid="stock.menu_product_variant_config_stock"]', - extra_trigger: '.o_sub_menu .oe_secondary_submenu:has(a[data-menu-xmlid="stock.menu_routes_config"])', + trigger: '.o_menu_sections [data-menu-xmlid="stock.menu_product_variant_config_stock"]', + extra_trigger: '.o_menu_sections:has(a[data-menu-xmlid="stock.menu_routes_config"])', timeout: 5000, }, { diff --git a/addons/web_tour/static/src/js/tour_manager.js b/addons/web_tour/static/src/js/tour_manager.js index 717b13a1e0d..4b318bf9446 100644 --- a/addons/web_tour/static/src/js/tour_manager.js +++ b/addons/web_tour/static/src/js/tour_manager.js @@ -373,17 +373,11 @@ return core.Class.extend(mixins.EventDispatcherMixin, ServicesMixin, { * Tour predefined steps */ STEPS: { - MENU_MORE: { - edition: "community", - trigger: "body > header > nav", - position: "bottom", + SHOW_APPS_MENU_ITEM: { + edition: 'community', + trigger: '.o_menu_apps a', auto: true, - run: function (actions) { - var $more = $('.o_extra_menu_items > .dropdown-toggle'); - if ($more.length) { - actions.auto($more); - } - }, + position: "bottom", }, TOGGLE_HOME_MENU: { diff --git a/odoo/addons/test_main_flows/static/src/js/tour.js b/odoo/addons/test_main_flows/static/src/js/tour.js index e0f209c2232..717c9d81884 100644 --- a/odoo/addons/test_main_flows/static/src/js/tour.js +++ b/odoo/addons/test_main_flows/static/src/js/tour.js @@ -9,19 +9,24 @@ var _t = core._t; tour.register('main_flow_tour', { test: true, url: "/web", -}, [tour.STEPS.MENU_MORE, { - trigger: '.o_app[data-menu-xmlid="sale.sale_menu_root"], .oe_menu_toggler[data-menu-xmlid="sale.sale_menu_root"]', +}, [tour.STEPS.SHOW_APPS_MENU_ITEM, { + trigger: '.o_app[data-menu-xmlid="sale.sale_menu_root"]', + content: _t('Organize your sales activities with the Sales app.'), + position: 'right', + edition: 'community' +}, { + trigger: '.o_app[data-menu-xmlid="sale.sale_menu_root"]', content: _t('Organize your sales activities with the Sales app.'), position: 'bottom', + edition: 'enterprise' }, { // Add Stockable product - edition: "enterprise", trigger: ".o_menu_sections a:contains('Products')", extra_trigger: '.o_main_navbar', content: _t("Let\'s create products."), position: "bottom", }, { - trigger: ".o_menu_sections a:has(span:contains('Products')), .oe_secondary_submenu .oe_menu_text:contains('Products'):first", + trigger: ".o_menu_sections a:has(span:contains('Products'))", content: _t("Let\'s create products."), position: "bottom" }, { @@ -269,10 +274,16 @@ tour.register('main_flow_tour', { trigger: '.o_menu_toggle', content: _t('Go back to the home menu'), position: 'bottom', +}, tour.STEPS.SHOW_APPS_MENU_ITEM, { + trigger: '.o_app[data-menu-xmlid="crm.crm_menu_root"]', + content: _t('Organize your sales activities with the CRM app.'), + position: 'right', + edition: 'community' }, { - trigger: '.o_app[data-menu-xmlid="crm.crm_menu_root"], .oe_menu_toggler[data-menu-xmlid="crm.crm_menu_root"]', + trigger: '.o_app[data-menu-xmlid="crm.crm_menu_root"]', content: _t('Organize your sales activities with the CRM app.'), position: 'bottom', + edition: 'enterprise' }, { trigger: ".o-kanban-button-new", extra_trigger: '.o_opportunity_kanban', @@ -390,17 +401,22 @@ tour.register('main_flow_tour', { trigger: '.o_menu_toggle', content: _t('Go back to the home menu'), position: 'bottom', +}, tour.STEPS.SHOW_APPS_MENU_ITEM, { + trigger: '.o_app:contains("Inventory")', + content: _t('Go to Inventory'), + position: 'right', + edition: 'community' }, { - trigger: '.o_app > div:contains("Inventory"), .oe_menu_toggler:contains("Inventory")', + trigger: '.o_app > div:contains("Inventory")', content: _t('Go to Inventory'), position: 'bottom', + edition: 'enterprise' }, { - edition: "enterprise", trigger: ".o_menu_sections a:contains('Master Data')", content: _t("Go to Master Data"), position: "bottom" }, { - trigger: ".o_menu_sections a[data-menu-xmlid='stock.menu_reordering_rules_config'], .oe_secondary_submenu a[data-menu-xmlid='stock.menu_reordering_rules_config']", + trigger: ".o_menu_sections a[data-menu-xmlid='stock.menu_reordering_rules_config']", content: _t("Reordering Rules"), position: "bottom" }, { @@ -431,12 +447,11 @@ tour.register('main_flow_tour', { position: "bottom" }, { // Run the schedulers - edition: "enterprise", trigger: ".o_menu_sections a:contains('Operations')", content: _t("Go to Run Schedulers"), position: "bottom" },{ - trigger: ".o_menu_sections a[data-menu-xmlid='stock.menu_procurement_compute'], .oe_secondary_submenu a[data-menu-xmlid='stock.menu_procurement_compute']", + trigger: ".o_menu_sections a[data-menu-xmlid='stock.menu_procurement_compute']", content: _t("Click on schedulers"), position: "bottom" }, { @@ -450,10 +465,16 @@ tour.register('main_flow_tour', { trigger: '.o_menu_toggle', content: _t('Go back to the home menu'), position: 'bottom', +}, tour.STEPS.SHOW_APPS_MENU_ITEM, { + trigger: '.o_app:contains("Purchase")', + content: _t('Go to Purchase'), + position: 'right', + edition: 'community' }, { - trigger: '.o_app > div:contains("Purchase"), .oe_menu_toggler:contains("Purchase")', + trigger: '.o_app > div:contains("Purchase")', content: _t('Go to Purchase'), position: 'bottom', + edition: 'enterprise' }, { trigger: '.o_data_row:has(.o_data_cell:contains("the_flow.vendor"))', content: _t('Select the generated request for quotation'), @@ -507,17 +528,21 @@ tour.register('main_flow_tour', { trigger: '.o_menu_toggle', content: _t('Go back to the home menu'), position: 'bottom', +}, tour.STEPS.SHOW_APPS_MENU_ITEM, { + trigger: '.o_app:contains("Manufacturing")', + content: _t('Go to Manufacturing'), + position: 'right', + edition: 'community' }, { - trigger: '.o_app > div:contains("Manufacturing"), .oe_menu_toggler:contains("Manufacturing")', + trigger: '.o_app > div:contains("Manufacturing")', content: _t('Go to Manufacturing'), position: 'bottom', + edition: 'enterprise' }, { - edition: "enterprise", trigger: ".o_menu_sections a[data-menu-xmlid='mrp.menu_mrp_manufacturing']", content: _t('Click on Operations menuitem'), position: 'bottom', }, { - edition: "enterprise", trigger: ".o_menu_sections a[data-menu-xmlid='mrp.menu_mrp_production_action']", content: _t('Open manufacturing orders'), position: 'bottom', @@ -546,17 +571,22 @@ tour.register('main_flow_tour', { trigger: '.o_menu_toggle', content: _t('Go back to the home menu'), position: 'bottom', -}, { - trigger: '.o_app[data-menu-xmlid="sale.sale_menu_root"], .oe_menu_toggler[data-menu-xmlid="sale.sale_menu_root"]', +}, tour.STEPS.SHOW_APPS_MENU_ITEM, { + trigger: '.o_app[data-menu-xmlid="sale.sale_menu_root"]', content: _t('Organize your sales activities with the Sales app.'), position: 'bottom', + edition: 'community' +}, { + trigger: '.o_app[data-menu-xmlid="sale.sale_menu_root"]', + content: _t('Organize your sales activities with the Sales app.'), + position: 'bottom', + edition: 'enterprise' }, { - edition: "enterprise", trigger: ".o_menu_sections a[data-menu-xmlid='sale.sale_order_menu']", content: _t("Go to Sales menu"), position: "bottom" }, { - trigger: ".o_menu_sections a[data-menu-xmlid='sale.menu_sale_order'], .oe_secondary_submenu a[data-menu-xmlid='sale.menu_sale_order']", + trigger: ".o_menu_sections a[data-menu-xmlid='sale.menu_sale_order']", content: _t("Go to the sales orders"), position: "bottom" }, { @@ -641,7 +671,7 @@ tour.register('main_flow_tour', { position: 'bottom', }, { edition: "enterprise", - trigger: '.o_app[data-menu-xmlid="account.menu_finance"], .oe_menu_toggler[data-menu-xmlid="account.menu_finance"]', + trigger: '.o_app[data-menu-xmlid="account.menu_finance"]', content: _t('Go to Accounting'), position: 'bottom', }, { diff --git a/odoo/addons/test_new_api/static/tests/x2many.js b/odoo/addons/test_new_api/static/tests/x2many.js index b66981a9c48..a3a54c23bff 100644 --- a/odoo/addons/test_new_api/static/tests/x2many.js +++ b/odoo/addons/test_new_api/static/tests/x2many.js @@ -329,23 +329,12 @@ odoo.define('web.test.x2many', function (require) { ///////////////////////////////////////////////////////////////////////////////////////////// { - content: "switch to the second form view to test one2many with editable list (toggle menu dropdown)", - trigger: '.o_sub_menu .oe_secondary_submenu .oe_menu_leaf .oe_menu_text:containsExact(Discussions)', - extra_trigger: '.tab-pane:eq(0) .o_field_widget tbody .o_data_row:eq(2)', - edition: 'community' - }, { content: "switch to the second form view to test one2many with editable list (toggle menu dropdown)", trigger: 'nav .o_menu_sections .dropdown-toggle:containsExact(Discussions)', extra_trigger: '.tab-pane:eq(0) .o_field_widget tbody .o_data_row:eq(2)', - edition: 'enterprise' - }, { - content: "switch to the second form view to test one2many with editable list (open submenu)", - trigger: '.o_sub_menu .oe_secondary_submenu .oe_menu_leaf .oe_menu_text:contains(Discussions 2)', - edition: 'community' }, { content: "switch to the second form view to test one2many with editable list (open submenu)", trigger: 'nav .o_menu_sections .dropdown-item:contains(Discussions 2)', - edition: 'enterprise' }, { content: "select previous created record", trigger: 'td:contains(test_trigger):last', @@ -457,23 +446,12 @@ odoo.define('web.test.x2many', function (require) { ///////////////////////////////////////////////////////////////////////////////////////////// { - content: "switch to the third form view to test onchange changing one2many (toggle menu dropdown)", - trigger: '.o_sub_menu .oe_secondary_submenu .oe_menu_leaf .oe_menu_text:containsExact(Discussions)', - extra_trigger: '.tab-pane:eq(0) .o_field_widget tbody .o_data_row:eq(2)', - edition: 'community' - }, { content: "switch to the third form view to test onchange changing one2many (toggle menu dropdown)", trigger: 'nav .o_menu_sections .dropdown-toggle:containsExact(Discussions)', extra_trigger: '.tab-pane:eq(0) .o_field_widget tbody .o_data_row:eq(2)', - edition: 'enterprise' - }, { - content: "switch to the thied form view to test onchange changing one2many (open submenu)", - trigger: '.o_sub_menu .oe_secondary_submenu .oe_menu_leaf .oe_menu_text:contains(Discussions 3)', - edition: 'community' }, { content: "switch to the thied form view to test onchange changing one2many (open submenu)", trigger: 'nav .o_menu_sections .dropdown-item:contains(Discussions 3)', - edition: 'enterprise' }, { content: "wait web client", trigger: '.breadcrumb:contains(Discussions 3)',