From b2ddb3e917448895e09d23e0cb7a8d38c3561b4b Mon Sep 17 00:00:00 2001 From: "Anh Thao Pham (pta)" Date: Fri, 23 Jul 2021 13:44:04 +0000 Subject: [PATCH] [FIX] website_sale: fix disabled confirmation button for free order - Go to website shop - Add free product or discount to cart to make sure that total amount is 0 - Try to confirm order It will not be possible because the "Confirm Order" button is disabled by default and there is no way to enable it. opw-2577089 closes odoo/odoo#74323 X-original-commit: c61349244ee09577c3e07e7b75da8a3c6134b0cf Signed-off-by: Anh Thao PHAM --- .../website_sale/static/src/js/website_sale_payment.js | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/addons/website_sale/static/src/js/website_sale_payment.js b/addons/website_sale/static/src/js/website_sale_payment.js index 63ae8c82269..28053604fcb 100644 --- a/addons/website_sale/static/src/js/website_sale_payment.js +++ b/addons/website_sale/static/src/js/website_sale_payment.js @@ -94,6 +94,16 @@ odoo.define('website_sale.payment', require => { 'change #checkbox_tc': '_onClickTCCheckbox', }, + /** + * @override + */ + start: function () { + this.$checkbox = this.$('#checkbox_tc'); + this.$submitButton = this.$('button[name="o_payment_submit_button"]'); + this._onClickTCCheckbox(); + return this._super(...arguments); + }, + //-------------------------------------------------------------------------- // Handlers //--------------------------------------------------------------------------