From cab25b690cd9541801e553a9f50512d2db126647 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Mon, 26 Aug 2019 13:23:38 +0000 Subject: [PATCH] [FIX] payment: fix error management in payment form PURPOSE Test frontend and UI tools of eLearning. SPECIFICATIONS Recent commit 5193f0d010f5cd3bf4ccc5c7e39aff3fdacdd111 introduced a tool method to parse errors and ease their management. A variable typo was done by mistake, fixed in this commit. LINKS Task ID 1937768 closes odoo/odoo#36085 Signed-off-by: Thibault Delavallee (tde) --- addons/payment/static/src/js/payment_form.js | 6 +++--- addons/payment_authorize/static/src/js/payment_form.js | 2 +- addons/payment_stripe/static/src/js/payment_form.js | 2 +- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/addons/payment/static/src/js/payment_form.js b/addons/payment/static/src/js/payment_form.js index 0085242483d..72a4b17fa29 100644 --- a/addons/payment/static/src/js/payment_form.js +++ b/addons/payment/static/src/js/payment_form.js @@ -252,7 +252,7 @@ publicWidget.registry.PaymentForm = publicWidget.Widget.extend({ self.displayError( _t('Server Error'), _t("We are not able to add your payment method at the moment.") + - this._parseError(error) + self._parseError(error) ); }); } @@ -302,7 +302,7 @@ publicWidget.registry.PaymentForm = publicWidget.Widget.extend({ self.displayError( _t('Server Error'), _t("We are not able to redirect you to the payment form. ") + - this._parseError(error) + self._parseError(error) ); }); } @@ -434,7 +434,7 @@ publicWidget.registry.PaymentForm = publicWidget.Widget.extend({ self.displayError( _t('Server error'), _t("We are not able to add your payment method at the moment.

") + - this._parseError(error) + self._parseError(error) ); }); } diff --git a/addons/payment_authorize/static/src/js/payment_form.js b/addons/payment_authorize/static/src/js/payment_form.js index d5d02a696c7..aab561066d7 100644 --- a/addons/payment_authorize/static/src/js/payment_form.js +++ b/addons/payment_authorize/static/src/js/payment_form.js @@ -78,7 +78,7 @@ PaymentForm.include({ self.displayError( _t('Server Error'), _t("We are not able to add your payment method at the moment.") + - this._parseError(error) + self._parseError(error) ); }); }; diff --git a/addons/payment_stripe/static/src/js/payment_form.js b/addons/payment_stripe/static/src/js/payment_form.js index e66fe0ebfb3..312afcf76bd 100644 --- a/addons/payment_stripe/static/src/js/payment_form.js +++ b/addons/payment_stripe/static/src/js/payment_form.js @@ -84,7 +84,7 @@ PaymentForm.include({ self.displayError( _t('Unable to save card'), _t("We are not able to add your payment method at the moment. ") + - this._parseError(error) + self._parseError(error) ); }); },