From 30296026f985c4e657922a46d56869a7cb838cb9 Mon Sep 17 00:00:00 2001 From: Prakash Prajapati Date: Fri, 26 Mar 2021 11:07:58 +0000 Subject: [PATCH] [FIX] account, purchase, sale: reposition tooltip to avoid resize flicker The tour bubble "animation" that makes it to bounce up and down can cause issues when its position is at the edge of the bottom of the screen. In the sale tour, this would make the window constantly resize to show a scrollbar and then resize to hide the scrollbar, creating quite a sickening effect visually. closes odoo/odoo#72485 Task-id: 2480195 X-original-commit: 8511d2352776a63fa2483dafac91a496d45461c1 Related: odoo/enterprise#19147 Signed-off-by: Victor Feyens (vfe) --- addons/account/static/src/js/tours/account.js | 3 +++ addons/purchase/static/src/js/tours/purchase.js | 2 +- addons/sale/static/src/js/tours/sale.js | 2 +- 3 files changed, 5 insertions(+), 2 deletions(-) diff --git a/addons/account/static/src/js/tours/account.js b/addons/account/static/src/js/tours/account.js index 39b60133d1c..e854f1c3bd0 100644 --- a/addons/account/static/src/js/tours/account.js +++ b/addons/account/static/src/js/tours/account.js @@ -19,6 +19,7 @@ tour.register('account_tour', { trigger: "button[name=action_save_onboarding_company_step]", extra_trigger: "a.o_onboarding_step_action[data-method=action_open_base_onboarding_company]", content: _t("Looks good. Let's continue."), + position: "left", }, { trigger: "a.o_onboarding_step_action[data-method=action_open_base_document_layout]", content: _t("Customize your layout."), @@ -27,6 +28,7 @@ tour.register('account_tour', { trigger: "button[name=document_layout_save]", extra_trigger: "a.o_onboarding_step_action[data-method=action_open_base_document_layout]", content: _t("Once everything is as you want it, validate."), + position: "left", }, { trigger: "a.o_onboarding_step_action[data-method=action_open_account_onboarding_create_invoice]", content: _t("Now, we'll create your first invoice."), @@ -84,6 +86,7 @@ tour.register('account_tour', { trigger: "button[name=send_and_print_action]", extra_trigger: "[name=move_type][raw-value=out_invoice]", content: _t("Let's send the invoice."), + position: "left" } ]); diff --git a/addons/purchase/static/src/js/tours/purchase.js b/addons/purchase/static/src/js/tours/purchase.js index 7baab8f4370..5daf141a696 100644 --- a/addons/purchase/static/src/js/tours/purchase.js +++ b/addons/purchase/static/src/js/tours/purchase.js @@ -112,7 +112,7 @@ tour.register('purchase_tour' , { trigger: ".modal-footer button[name='action_send_mail']", extra_trigger: ".modal-footer button[name='action_send_mail']", content: _t("Send the request for quotation to your vendor."), - position: "bottom", + position: "left", run: 'click', }, { trigger: ".o_field_widget [name=price_unit]", diff --git a/addons/sale/static/src/js/tours/sale.js b/addons/sale/static/src/js/tours/sale.js index e59bde59a24..d01b0ad6837 100644 --- a/addons/sale/static/src/js/tours/sale.js +++ b/addons/sale/static/src/js/tours/sale.js @@ -28,7 +28,7 @@ tour.register("sale_tour", { }, { trigger: ".modal-content button[name='action_save_onboarding_company_step']", content: _t("Looks good. Let's continue."), - position: "bottom", + position: "left", }, { trigger: 'a.o_onboarding_step_action.btn[data-method=action_open_base_document_layout]', extra_trigger: ".o_sale_order",