From 9a0050149e26bca4a6f5c5366bd85909cc1cd4a8 Mon Sep 17 00:00:00 2001 From: "Laurent Stukkens (LTU)" Date: Mon, 11 Jul 2022 16:24:08 +0000 Subject: [PATCH] [FIX] sale_timesheet: prevent sale_timesheet_tour to indeterministically fail Prior to this commit, the `sale_timesheet_tour` was indeterministically failing due to the fact that the tour step responsible of saving the data was not waiting for the previous step (responsible to confirm the SO) to be finished. This commit fixes this issue by ensuring that the buttons that allow confirming the SO are not visible any more. closes odoo/odoo#95825 X-original-commit: 287a7449ed5c809847a6b0c9719b8b3cc0215e3a Signed-off-by: Xavier Signed-off-by: Laurent Stukkens (ltu) --- .../sale_timesheet/static/tests/tours/sale_timesheet_tour.js | 5 +++++ 1 file changed, 5 insertions(+) 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 d3e7aa9731b..faaa30bcd52 100644 --- a/addons/sale_timesheet/static/tests/tours/sale_timesheet_tour.js +++ b/addons/sale_timesheet/static/tests/tours/sale_timesheet_tour.js @@ -47,8 +47,13 @@ tour.register('sale_timesheet_tour', { run: 'click', }, { trigger: 'button.o_form_button_save', + extra_trigger: '.o_form_view:not(:has(button[name="action_confirm"]:not(.o_invisible_modifier)))', content: 'Click on Save button to save the Sales Order.', run: 'click', +}, { + trigger: '.o_form_readonly', + content: 'Save is done and form is reloaded.', + run: 'click', }, tour.stepUtils.toggleHomeMenu(), ...tour.stepUtils.goToAppSteps("project.menu_main_pm", 'Go to the Project app.'), {