diff options
| author | Frederic van der Essen <fva@openerp.com / fvdessen+o@gmail.com> | 2014-10-27 12:21:04 +0100 |
|---|---|---|
| committer | Frederic van der Essen <fva@openerp.com / fvdessen+o@gmail.com> | 2014-10-27 12:21:04 +0100 |
| commit | 230f55face5f212b48104de37669b4e6ab19a502 (patch) | |
| tree | 403701262704e7d9451b38887865e1245d6cedb7 /addons/web/static/src/js | |
| parent | 24ec228acc9cd185a8b00eca740fccf24ed789b2 (diff) | |
[FIX] web: cors rpc calls were missing the session cookie, resulting in new sessions being created for every call
Diffstat (limited to 'addons/web/static/src/js')
| -rw-r--r-- | addons/web/static/src/js/openerpframework.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/addons/web/static/src/js/openerpframework.js b/addons/web/static/src/js/openerpframework.js index de8f5f660a3..007edae7220 100644 --- a/addons/web/static/src/js/openerpframework.js +++ b/addons/web/static/src/js/openerpframework.js @@ -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. |
