summaryrefslogtreecommitdiff
path: root/addons/web/static/src
diff options
context:
space:
mode:
authorGéry Debongnie <ged@odoo.com>2015-03-19 14:56:21 +0100
committerGéry Debongnie <ged@odoo.com>2015-03-19 14:57:29 +0100
commit04da153fe995e0aab56e9b03a7fec532eab9356b (patch)
tree021de0271896eacba6998b4ea9b05c5b530c6d55 /addons/web/static/src
parentbc11d27f62faa061ab48ee006996c3023304d398 (diff)
[FIX] web: session requires a name to properly work
For historic reasons, the session had a name (hardcoded to "instance0"), used in at least one place: the get and set cookie methods. The idea was most likely to allow multiple instances of the web client to coexist peacefully. This does not work at all at least for the last versions, and the new module system is a better way to do it anyway. However, before removing completely the prefix in cookies, we should actually check if no external code depends on it.
Diffstat (limited to 'addons/web/static/src')
-rw-r--r--addons/web/static/src/js/framework/session.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/addons/web/static/src/js/framework/session.js b/addons/web/static/src/js/framework/session.js
index 51ebc10b172..4cc9a481b4d 100644
--- a/addons/web/static/src/js/framework/session.js
+++ b/addons/web/static/src/js/framework/session.js
@@ -33,6 +33,11 @@ var Session = core.Class.extend(mixins.EventDispatcherMixin, {
this.use_cors = options.use_cors || false;
this.setup(origin);
this.debug = ($.deparam($.param.querystring()).debug !== undefined);
+
+ // for historic reasons, the session requires a name to properly work
+ // (see the methods get_cookie and set_cookie). We should perhaps
+ // remove it totally (but need to make sure the cookies are properly set)
+ this.name = "instance0";
// TODO: session store in cookie should be optional
this.qweb_mutex = new utils.Mutex();
},