[MERGE] Merged lp:~openerp-dev/openerp-web/7.0-pos-improvements-fva (using -r 3867..3868).

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

bzr revid: tde@openerp.com-20130711084451-inllzawy31589568
This commit is contained in:
Thibault Delavallée 2013-07-11 10:44:51 +02:00
commit ccc2dd61ce
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) {