[IMP] web corelib: adding timeout option to the rpc api

bzr revid: fva@openerp.com-20130328153951-om7hrs5l10oc0vm2
This commit is contained in:
Frédéric van der Essen 2013-03-28 16:39:51 +01:00
parent ab154e8cbc
commit 703039f7c6
1 changed files with 3 additions and 0 deletions

View File

@ -1011,6 +1011,9 @@ instance.web.JsonRPC = instance.web.Class.extend(instance.web.PropertiesMixin, {
var deferred = $.Deferred();
if (! options.shadow)
this.trigger('request', url, payload);
if (options.timeout)
url.timeout = options.timeout;
this.rpc_function(url, payload).then(
function (response, textStatus, jqXHR) {