From 5210929b371e8969ea479c85545deb9405306c74 Mon Sep 17 00:00:00 2001 From: Florian Gilbert Date: Fri, 18 Oct 2019 06:26:24 +0000 Subject: [PATCH] [FIX] account: Adapt the tour for invoicing and accounting. The reason of this fix is that we reference some account accountant menu in the invoicing menu and if you are not in enterprise version with accounting installed, the tours don't work. The tours are adapted for each versions. closes odoo/odoo#39104 Signed-off-by: Laurent Smet --- .../static/tests/tours/tax_group_tests.js | 24 ++++++++++++------- 1 file changed, 16 insertions(+), 8 deletions(-) diff --git a/addons/account/static/tests/tours/tax_group_tests.js b/addons/account/static/tests/tours/tax_group_tests.js index 4889803e2fe..7d3ffd9ce85 100644 --- a/addons/account/static/tests/tours/tax_group_tests.js +++ b/addons/account/static/tests/tours/tax_group_tests.js @@ -1,4 +1,4 @@ -odoo.define('account.tax_group_tour_tests', function (require) { +odoo.define('account.tax.group.tour.tests', function (require) { "use strict"; var core = require('web.core'); @@ -9,15 +9,26 @@ odoo.define('account.tax_group_tour_tests', function (require) { test: true, url: "/web", }, [tour.STEPS.SHOW_APPS_MENU_ITEM, + { + content: "Go to Invoicing", + trigger: '.o_app[data-menu-xmlid="account.menu_finance"]', + edition: 'community', + }, { content: "Go to Accounting", trigger: '.o_app[data-menu-xmlid="account_accountant.menu_accounting"]', + edition: 'enterprise', + }, + { + content: "Go to Vendors", + trigger: 'a:contains("Vendors")', }, { content: "Go to Bills", - trigger: 'span:contains("Vendor Bills")', + trigger: 'span:contains("Bills")', }, { + extra_trigger: '.breadcrumb:contains("Bills")', content: "Create new bill", trigger: '.o_list_button_add', }, @@ -66,13 +77,10 @@ odoo.define('account.tax_group_tour_tests', function (require) { }, { content: "Modify the input value", - trigger: '.oe_tax_group_amount_value input', - run: "text 200", - }, - { - content: "Valid the new value", - trigger: '.oe_tax_group_amount_value input', + trigger: '.tax_group_edit_input input', run: function (actions) { + $('.tax_group_edit_input input').val(200); + $('.tax_group_edit_input input').select(); var keydownEvent = jQuery.Event('keydown'); keydownEvent.which = 13; this.$anchor.trigger(keydownEvent);