From 7743f13c0409195a3270ff516ccfc27db20dd2a9 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Mon, 15 Jul 2013 14:16:11 +0200 Subject: [PATCH] [FIX] small bug that made the reports crash when we try to print them bzr revid: nicolas.vanhoren@openerp.com-20130715121611-q68m7w62h8ngnb2i --- addons/web/static/src/js/coresetup.js | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/addons/web/static/src/js/coresetup.js b/addons/web/static/src/js/coresetup.js index 3ba5855533f..c9c6f82a98d 100644 --- a/addons/web/static/src/js/coresetup.js +++ b/addons/web/static/src/js/coresetup.js @@ -334,9 +334,10 @@ instance.web.Session = instance.web.JsonRPC.extend( /** @lends instance.web.Sess }).appendTo(document.body); } - _(_.extend({}, options.data || {}, - {session_id: this.override_session ? this.session_id : undefined, token: token})) - .each(function (value, key) { + var hparams = _.extend({}, options.data || {}, {token: token}); + if (this.override_session) + hparams.session_id = this.session_id; + _.each(hparams, function (value, key) { var $input = $form.find('[name=' + key +']'); if (!$input.length) { $input = $('')