[FIX] embed client do not save the session to a cookie
bzr revid: chs@openerp.com-20111221104031-yfek5s723icczxv7
This commit is contained in:
@@ -1132,7 +1132,7 @@ openerp.web.embed = function (origin, dbname, login, key, action, options) {
|
||||
currentScript = sc[sc.length-1];
|
||||
}
|
||||
openerp.connection.bind(origin).then(function () {
|
||||
openerp.connection.session_authenticate(dbname, login, key).then(function () {
|
||||
openerp.connection.session_authenticate(dbname, login, key, true).then(function () {
|
||||
var client = new openerp.web.EmbeddedClient(action, options);
|
||||
client.insertAfter(currentScript);
|
||||
});
|
||||
|
||||
@@ -564,7 +564,7 @@ openerp.web.Connection = openerp.web.CallbackEnabled.extend( /** @lends openerp.
|
||||
/**
|
||||
* The session is validated either by login or by restoration of a previous session
|
||||
*/
|
||||
session_authenticate: function(db, login, password) {
|
||||
session_authenticate: function(db, login, password, volatile) {
|
||||
var self = this;
|
||||
var base_location = document.location.protocol + '//' + document.location.host;
|
||||
var params = { db: db, login: login, password: password, base_location: base_location };
|
||||
@@ -576,8 +576,9 @@ openerp.web.Connection = openerp.web.CallbackEnabled.extend( /** @lends openerp.
|
||||
uid: result.uid,
|
||||
user_context: result.context
|
||||
});
|
||||
// TODO: session store in cookie should be optional
|
||||
self.set_cookie('session_id', self.session_id);
|
||||
if (!volatile) {
|
||||
self.set_cookie('session_id', self.session_id);
|
||||
}
|
||||
return self.load_modules();
|
||||
});
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user