diff options
| author | Goffin Simon <sig@odoo.com> | 2020-08-12 08:03:22 +0000 |
|---|---|---|
| committer | Goffin Simon <sig@odoo.com> | 2020-08-12 14:32:16 +0000 |
| commit | decfd753f968cbea8b2955562b7774e88ac7d637 (patch) | |
| tree | 1c71eea08a2669d67e2b9aaddb03e8758d0fe590 /addons/payment/static/src | |
| parent | 6ce8639e14909d404ee64fc67e59f7e08c3cf726 (diff) | |
[FIX] payment: Pay button always enabled with Term & Conditions
Steps to reproduce:
- Go to the website shop
- Add a product in the cart
- Add your address and click on checkout
- On the checkout, enable Terms & conditions
Bug:
The button was always enabled even if the check box with the terms & conditions were not
checked.
opw:2313437
closes odoo/odoo#55821
X-original-commit: 0415da51960819ec9c989e15a9229bd6d583ba1b
Signed-off-by: Simon Goffin (sig) <sig@openerp.com>
Diffstat (limited to 'addons/payment/static/src')
| -rw-r--r-- | addons/payment/static/src/js/payment_form.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/addons/payment/static/src/js/payment_form.js b/addons/payment/static/src/js/payment_form.js index 90f1a4843c5..67ac150e10a 100644 --- a/addons/payment/static/src/js/payment_form.js +++ b/addons/payment/static/src/js/payment_form.js @@ -22,7 +22,9 @@ publicWidget.registry.PaymentForm = publicWidget.Widget.extend({ * @override */ start: function () { - $("#o_payment_form_pay").removeAttr('disabled'); + if(!$('#checkbox_cgv').length){ + $("#o_payment_form_pay").removeAttr('disabled'); + } var self = this; return this._super.apply(this, arguments).then(function () { self.options = _.extend(self.$el.data(), self.options); |
