From fe9d1720ea18d52e29c9f86b37504f71a3011ad4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Adrien=20Dieudonn=C3=A9?= Date: Wed, 17 Aug 2022 12:52:09 +0000 Subject: [PATCH] [FIX] sale: portal: automatically open the popup for payment MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit, the popup for payment wasn't open after signature. This is because Bootstrap no longer uses jQuery and jQuery .trigger only calls jQuery handlers. See 'o_sale_portal_paynow' button with data-bs attributes on it. closes odoo/odoo#98290 Signed-off-by: Adrien Dieudonné (adr) --- addons/sale/static/src/js/sale_portal_sidebar.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/sale/static/src/js/sale_portal_sidebar.js b/addons/sale/static/src/js/sale_portal_sidebar.js index 2b404ba122f..f78623e42b8 100644 --- a/addons/sale/static/src/js/sale_portal_sidebar.js +++ b/addons/sale/static/src/js/sale_portal_sidebar.js @@ -26,7 +26,7 @@ publicWidget.registry.SalePortalSidebar = PortalSidebar.extend({ this._generateMenu(); // After signature, automatically open the popup for payment if ($.bbq.getState('allow_payment') === 'yes' && this.$('#o_sale_portal_paynow').length) { - this.$('#o_sale_portal_paynow').trigger('click'); + this.el.querySelector('#o_sale_portal_paynow').click(); $.bbq.removeState('allow_payment'); } return def;