From f414b4227a80417250f4f48593d2b63af07a3c25 Mon Sep 17 00:00:00 2001 From: Goffin Simon Date: Wed, 22 Nov 2017 11:23:33 +0100 Subject: [PATCH] [FIX] payment: Cannot add a new card from My Account portal Steps to reproduce the bug: Setup Authorize.net test account, then go to My Account from portal and select "Manage your Payment Methods" and add a new card. Bug: It raised "Please fill all the inputs required." opw:782716 --- 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 bdac673f67e..9cf567f5973 100644 --- a/addons/payment/static/src/js/payment_form.js +++ b/addons/payment/static/src/js/payment_form.js @@ -209,11 +209,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; } });