diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js index 21a4ca21931..4ed33341ea6 100644 --- a/addons/web/static/src/js/core.js +++ b/addons/web/static/src/js/core.js @@ -361,6 +361,9 @@ openerp.web.Session = openerp.web.CallbackEnabled.extend( /** @lends openerp.web this.context = {}; this.shortcuts = []; this.active_id = null; + // TODO: session should have an optional name indicating that they'll + // be saved to (and revived from) cookies + this.name = 'session'; }, start: function() { this.session_restore(); @@ -525,7 +528,8 @@ openerp.web.Session = openerp.web.CallbackEnabled.extend( /** @lends openerp.web * @param name the cookie's name */ get_cookie: function (name) { - var nameEQ = this.element_id + '|' + name + '='; + if (!this.name) { return null; } + var nameEQ = this.name + '|' + name + '='; var cookies = document.cookie.split(';'); for(var i=0; i