[FIX] web: cors rpc calls were missing the session cookie, resulting in new sessions being created for every call

This commit is contained in:
Frederic van der Essen 2014-10-27 12:21:04 +01:00
parent 24ec228acc
commit 230f55face
1 changed files with 2 additions and 2 deletions

View File

@ -1058,11 +1058,11 @@ openerp.Session = openerp.Class.extend(openerp.PropertiesMixin, {
},
check_session_id: function() {
var self = this;
if (this.avoid_recursion || self.use_cors)
if (this.avoid_recursion)
return $.when();
if (this.session_id)
return $.when(); // we already have the session id
if (this.override_session || ! this.origin_server) {
if (!this.use_cors && (this.override_session || ! this.origin_server)) {
// If we don't use the origin server we consider we should always create a new session.
// Even if some browsers could support cookies when using jsonp that behavior is
// not consistent and the browser creators are tending to removing that feature.