[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 <kitan191@users.noreply.github.com>
This commit is contained in:
Anh Thao Pham (pta)
2021-07-27 14:51:34 +00:00
parent 5a620eded9
commit b2ddb3e917
@@ -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
//--------------------------------------------------------------------------