From dae6178a0a5629ce678b20fcc9226caa44a5b0ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Wed, 30 Aug 2017 16:15:18 +0200 Subject: [PATCH] [FIX] payment: fix issue about required fields in payment form It seems like even a correctly-filled field triggers an empty input error because variable about empty error is always True. --- addons/payment/static/src/js/payment_form.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/payment/static/src/js/payment_form.js b/addons/payment/static/src/js/payment_form.js index 491cafcf00c..f95fd50f9fe 100644 --- a/addons/payment/static/src/js/payment_form.js +++ b/addons/payment/static/src/js/payment_form.js @@ -41,11 +41,11 @@ odoo.define('payment.payment_form', function (require){ if(element.dataset.isRequired) { if (element.value.length === 0) { $(element).closest('div.form-group').addClass('has-error'); + empty_inputs = true; } else { $(element).closest('div.form-group').removeClass('has-error'); } - empty_inputs = true; } });