[FIX] then -> done; pipe -> then

bzr revid: chs@openerp.com-20121108165608-e67f0dwwufdpfmzt
This commit is contained in:
Christophe Simonis 2012-11-08 17:56:08 +01:00
parent c71f018440
commit deb730e562
1 changed files with 2 additions and 2 deletions

View File

@ -20,7 +20,7 @@ openerp.base = function(instance) {
i.onload = function() {
console.log('client is available', client);
client.session.session_bind(client.origin).then(function() {
client.session.session_bind(client.origin).done(function() {
// check if client can authenticate
client.authenticate().done(function() {
d.resolve(client);
@ -51,7 +51,7 @@ openerp.base = function(instance) {
var DEFAULT_SERVER = 'http://apps.v7.openerp.com:8069/apps'; // TEST
//var DEFAULT_SERVER = 'http://localhost:8080/trunk_loempia7'; // DEV
var ICP = new instance.web.Model('ir.config_parameter');
return ICP.call('get_param', ['loempia.server', DEFAULT_SERVER]).pipe(function(u) {
return ICP.call('get_param', ['loempia.server', DEFAULT_SERVER]).then(function(u) {
var link = $(_.str.sprintf('<a href="%s"></a>', u))[0];
var host = _.str.sprintf('%s//%s', link.protocol, link.host);
var dbname = link.pathname.substr(1);