diff options
| author | Toufik Ben Jaa <tbe@odoo.com> | 2019-05-17 09:55:59 +0000 |
|---|---|---|
| committer | Toufik Ben Jaa <tbe@odoo.com> | 2019-05-17 13:17:01 +0000 |
| commit | 3c305daded374d22a40e22bcdf6bf4c9e4cb3359 (patch) | |
| tree | b761c7c13de233799aba96fd3e93daa5090c91dd /addons/payment/static/src | |
| parent | c209c250d772005132b430c6a3bf3813cd6d3093 (diff) | |
[FIX] payment: do not display postgres operational errors
- When processing payments on the payments processing page,
`psycopg2.OperationalError` can be raised.
We do not want those exceptions to be displayed to the customers,
instead we want the polling page to try to process the payments again.
This commit hides the display of psycopg2 operational errors.
- This commit also fixes the "processing your payments" message being
hidden after the first polling, no matter if the processing has succeeded or not.
closes odoo/odoo#33462
Signed-off-by: Toufik Benjaa (tbe) <tbe@odoo.com>
Diffstat (limited to 'addons/payment/static/src')
| -rw-r--r-- | addons/payment/static/src/js/payment_processing.js | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/addons/payment/static/src/js/payment_processing.js b/addons/payment/static/src/js/payment_processing.js index 4397bf134f1..5409b915526 100644 --- a/addons/payment/static/src/js/payment_processing.js +++ b/addons/payment/static/src/js/payment_processing.js @@ -54,6 +54,8 @@ odoo.define('payment.processing', function (require) { } else { switch(data.error) { + case "tx_process_retry": + break; case "no_tx_found": self.displayContent("payment.no_tx_found", {}); break; @@ -63,11 +65,7 @@ odoo.define('payment.processing', function (require) { } } self.startPolling(); - }).always(function(){ - if ($.blockUI) { - $.unblockUI(); - } - }).fail(function(e) { + }).fail(function(e) { self.displayContent("payment.rpc_error", {}); self.startPolling(); }); @@ -117,6 +115,7 @@ odoo.define('payment.processing', function (require) { }, displayContent: function (xmlid, render_values) { var html = Qweb.render(xmlid, render_values); + $.unblockUI(); this.$el.find('.o_payment_processing_content').html(html); }, displayLoading: function () { |
