From d36a4dd14ea93090ffe7a0b145005a2c6f44bacd Mon Sep 17 00:00:00 2001 From: "Habib (ayh)" Date: Fri, 5 Aug 2022 15:48:28 +0000 Subject: [PATCH] [FIX] account,l10n_ar,test_main_flows: tour As the owl views gets activate, the tours gets broken. Part-of: odoo/odoo#96672 --- addons/account/static/src/js/tours/account.js | 6 +++--- .../static/tests/tours/account_dashboard_setup_bar_tests.js | 5 ++--- addons/l10n_ar/static/src/js/tours/account.js | 3 ++- odoo/addons/test_main_flows/static/tests/tours/main_flow.js | 3 ++- 4 files changed, 9 insertions(+), 8 deletions(-) diff --git a/addons/account/static/src/js/tours/account.js b/addons/account/static/src/js/tours/account.js index 4cbe7d260f9..2e79bd1f234 100644 --- a/addons/account/static/src/js/tours/account.js +++ b/addons/account/static/src/js/tours/account.js @@ -59,14 +59,14 @@ tour.register('account_tour', { 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])", + trigger: "div[name=invoice_line_ids] .o_field_x2many_list_row_add a", // FIXME WOWL: this selector needs to work in both legacy and non-legacy views // because account_invoice_extracts *adds* a js_class on the base view which forces // the use of a legacy view in enterprise only extra_trigger: "[name=move_type] [raw-value=out_invoice], [name=move_type][raw-value=out_invoice]", content: _t("Add a line to your invoice"), }, { - trigger: "div[name=invoice_line_ids] textarea[name=name]", + trigger: "div[name=invoice_line_ids] div[name=name] textarea", // FIXME WOWL: this selector needs to work in both legacy and non-legacy views // because account_invoice_extracts *adds* a js_class on the base view which forces // the use of a legacy view in enterprise only @@ -74,7 +74,7 @@ tour.register('account_tour', { content: _t("Fill in the details of the line."), position: "bottom", }, { - trigger: "div[name=invoice_line_ids] input[name=price_unit]", + trigger: "div[name=invoice_line_ids] div[name=price_unit] input", // FIXME WOWL: this selector needs to work in both legacy and non-legacy views // because account_invoice_extracts *adds* a js_class on the base view which forces // the use of a legacy view in enterprise only diff --git a/addons/account/static/tests/tours/account_dashboard_setup_bar_tests.js b/addons/account/static/tests/tours/account_dashboard_setup_bar_tests.js index 23244ce216a..cb512f61325 100644 --- a/addons/account/static/tests/tours/account_dashboard_setup_bar_tests.js +++ b/addons/account/static/tests/tours/account_dashboard_setup_bar_tests.js @@ -15,13 +15,12 @@ odoo.define('account.dashboard.setup.tour', function (require) { trigger: '.o_app[data-menu-xmlid="account.menu_finance"]', position: 'bottom', }, { - trigger: '.o_data_row:first', + trigger: '.o_data_row:first .o_data_cell', extra_trigger: '.breadcrumb', }, { trigger: '.o_control_panel button:contains("' + _t('Print') + '")', }, { - // TODO: remove the first selector when the "account_move_form" view is converted to owl - trigger: '.o_control_panel .o-dropdown-menu a:contains("' + _t('Invoices without Payment') + '"), .o_control_panel .o-dropdown--menu span:contains("' + _t('Invoices without Payment') + '")', + trigger: '.o_control_panel .o-dropdown--menu span:contains("' + _t('Invoices without Payment') + '")', }, { trigger: 'iframe .o_report_layout_standard h2', content: 'Primary color is correct', diff --git a/addons/l10n_ar/static/src/js/tours/account.js b/addons/l10n_ar/static/src/js/tours/account.js index ca3e4467bb0..28b0037464a 100644 --- a/addons/l10n_ar/static/src/js/tours/account.js +++ b/addons/l10n_ar/static/src/js/tours/account.js @@ -9,8 +9,9 @@ odoo.define('l10n_ar.account_tour', function(require) { // Configure the AFIP Responsibility let partner_step_idx = _.findIndex(account_tour.steps, step => step.trigger == 'div[name=partner_id] input'); account_tour.steps.splice(partner_step_idx + 2, 0, { + // FIXME WOWL: this selector needs to work in both legacy and non-legacy views trigger: "div[name=l10n_ar_afip_responsibility_type_id] input", - extra_trigger: "[name=move_type][raw-value=out_invoice]", + extra_trigger: "[name=move_type] [raw-value=out_invoice], [name=move_type][raw-value=out_invoice]", position: "bottom", content: "Set the AFIP Responsability", run: "text IVA", diff --git a/odoo/addons/test_main_flows/static/tests/tours/main_flow.js b/odoo/addons/test_main_flows/static/tests/tours/main_flow.js index e81233eab4b..53d5d3496d7 100644 --- a/odoo/addons/test_main_flows/static/tests/tours/main_flow.js +++ b/odoo/addons/test_main_flows/static/tests/tours/main_flow.js @@ -989,8 +989,9 @@ tour.stepUtils.autoExpandMoreButtons('.o_control_panel .breadcrumb:contains("the content: _t('Go to Accounting'), position: 'bottom', }, { + // FIXME WOWL: this selector needs to work in both legacy and non-legacy views edition: "enterprise", - trigger: 'div[name=bank_statement_create_button] > a[data-name=create_bank_statement]', + trigger: 'div[name=bank_statement_create_button] > a[data-name=create_bank_statement], div[name=bank_statement_create_button] > a[name=create_bank_statement]', content: _t('Create a new bank statement'), position: 'bottom', }, {