[FIX] *: adapt tours for the new community navbar

*: crm,
   hr_expense,
   hr_recruitment,
   point_of_sale,
   project,
   sale,
   stock,
   web_tour,
   test_main_flows,
   test_new_api

To sum up:
- Click on "Apps Menu" then the app item.
  (previously: click on '+' then the app item).
- Click on navbar section menu item.
  (previously: click on sidebar section menu item).
This commit is contained in:
Alexandre Kühn
2018-09-17 16:46:53 +02:00
parent 19eacf7d23
commit 38c7ed3c73
10 changed files with 122 additions and 77 deletions
+25 -9
View File
@@ -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 <b>Pipeline</b> can be found here, under the <b>CRM</b> app."),
position: 'right',
edition: 'community'
}, {
trigger: '.o_app[data-menu-xmlid="crm.crm_menu_root"]',
content: _t("Ready to boost your sales? Your <b>Pipeline</b> can be found here, under the <b>CRM</b> 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 <b>go back to your sales pipeline</b>."),
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("<b>Invite coworkers</b> via email.<br/><i>Enter one email per line.</i>"),
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'
}]);
});
+9 -6
View File
@@ -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("<p>Once your <b> Expense </b> is ready, you can save it.</p>"),
+8 -2
View File
@@ -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 <b>start recruiting</b> like a pro? <i>Start here.</i>'),
position: 'right',
edition: 'community'
}, {
trigger: '.o_app[data-menu-xmlid="hr_recruitment.menu_hr_recruitment_root"]',
content: _t('Want to <b>start recruiting</b> like a pro? <i>Start here.</i>'),
position: 'bottom',
edition: 'enterprise'
}, {
trigger: ".o-kanban-button-new",
extra_trigger: '.o_hr_recruitment_kanban',
+8 -2
View File
@@ -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 <b>point of sale</b>? <i>Click here</i>."),
position: 'right',
edition: 'community'
}, {
trigger: '.o_app[data-menu-xmlid="point_of_sale.menu_point_root"]',
content: _t("Ready to launch your <b>point of sale</b>? <i>Click here</i>."),
position: 'bottom',
edition: 'enterprise'
}, {
trigger: ".o_pos_kanban button.oe_kanban_action_button",
content: _t("<p>Click to start the point of sale interface. It <b>runs on tablets</b>, laptops, or industrial hardware.</p><p>Once the session launched, the system continues to run without an internet connection.</p>"),
+8 -2
View File
@@ -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 <b>manage your projects</b>? <i>It starts here.</i>'),
position: 'right',
edition: 'community',
}, {
trigger: '.o_app[data-menu-xmlid="project.menu_main_pm"]',
content: _t('Want a better way to <b>manage your projects</b>? <i>It starts here.</i>'),
position: 'bottom',
edition: 'enterprise',
}, {
trigger: '.o-kanban-button-new',
extra_trigger: '.o_project_kanban',
+9 -3
View File
@@ -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 <b>Sales Management app</b>.'),
position: 'right',
edition: 'community'
}, {
trigger: '.o_app[data-menu-xmlid="sale.sale_menu_root"]',
content: _t('Organize your sales activities with the <b>Sales Management app</b>.'),
position: 'bottom',
}, {
edition: 'enterprise'
}, {
trigger: ".o_list_button_add",
extra_trigger: ".o_sale_order",
content: _t("Let's create a new quotation.<br/><i>Note that colored buttons usually point to the next logical actions.</i>"),
+2 -2
View File
@@ -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,
},
{
+4 -10
View File
@@ -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: {
@@ -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 <b>Sales app</b>.'),
position: 'right',
edition: 'community'
}, {
trigger: '.o_app[data-menu-xmlid="sale.sale_menu_root"]',
content: _t('Organize your sales activities with the <b>Sales app</b>.'),
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 <b>CRM app</b>.'),
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 <b>CRM app</b>.'),
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 <b>Sales app</b>.'),
position: 'bottom',
edition: 'community'
}, {
trigger: '.o_app[data-menu-xmlid="sale.sale_menu_root"]',
content: _t('Organize your sales activities with the <b>Sales app</b>.'),
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',
}, {
@@ -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)',