From 4e85f0762cc69af8efdb88ec857329ac955afe0b Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Thu, 17 Nov 2011 13:49:26 +0100 Subject: [PATCH] [IMP] Connection: add utility method that bind() then login() bzr revid: chs@openerp.com-20111117124926-y3z3osoq76va0kjy --- addons/web/static/src/js/core.js | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/addons/web/static/src/js/core.js b/addons/web/static/src/js/core.js index 8d7bed56b5b..113b83f57dc 100644 --- a/addons/web/static/src/js/core.js +++ b/addons/web/static/src/js/core.js @@ -385,6 +385,13 @@ openerp.web.Connection = openerp.web.CallbackEnabled.extend( /** @lends openerp. this.do_load_qweb(['/web/webclient/qweb'], continuation); }, + connect: function(server, db, login, password, continuation) { + var self = this; + this.bind(server, function() { + self.login(db, login, password, continuation); + }); + }, + get_absolute_url: function(path) { var r_has_protocol = /^https?:\/\//, r_absolute_internal = /^\/[^\/]/; // starts with / (but not //)