From c962e0100d238b031bad626d0606759db0ae0497 Mon Sep 17 00:00:00 2001 From: Fabien Meghazi Date: Thu, 27 Sep 2012 15:13:33 +0200 Subject: [PATCH] [HACK] window.location will end pending rpc calls triggering the crashmanager. Used a hack bzr revid: fme@openerp.com-20120927131333-0wrccue8jbetkwmj --- .../static/src/js/auth_oauth2_provider.js | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/auth_oauth2_provider/static/src/js/auth_oauth2_provider.js b/addons/auth_oauth2_provider/static/src/js/auth_oauth2_provider.js index 04358a490de..bed76e38941 100644 --- a/addons/auth_oauth2_provider/static/src/js/auth_oauth2_provider.js +++ b/addons/auth_oauth2_provider/static/src/js/auth_oauth2_provider.js @@ -63,6 +63,11 @@ instance.auth_oauth2_provider.ProviderAction = instance.web.Widget.extend({ new_params.state = params.state; } var redirect = params.redirect_uri + (a.hash ? '&' : '#') + $.param(new_params); + + // Hack in order to avoid pending request failure notification + // TODO: a stop() method on webclient wich will return a deferred resolved when pending + // rpc calls are done + instance.session.on_rpc_error = function() { }; window.location = redirect; }, error: function(msg) {