summaryrefslogtreecommitdiff
path: root/addons/web/common/dispatch.py
diff options
context:
space:
mode:
authorniv-openerp <nicolas.vanhoren@openerp.com>2011-09-29 14:17:32 +0200
committerniv-openerp <nicolas.vanhoren@openerp.com>2011-09-29 14:17:32 +0200
commita658311000e9ad5a7d078a562da3a9e716f2d4f3 (patch)
tree3a96de73e9d0c05cf6cfbe1e7d22f2eea4c70d25 /addons/web/common/dispatch.py
parent3c7093aa6e33fa21f06a90383e13c1fc2ebdde2a (diff)
[imp] now uses a global connector for connection to OpenERP server
bzr revid: nicolas.vanhoren@openerp.com-20110929121732-xydsj26xw9fyn1hr
Diffstat (limited to 'addons/web/common/dispatch.py')
-rw-r--r--addons/web/common/dispatch.py7
1 files changed, 7 insertions, 0 deletions
diff --git a/addons/web/common/dispatch.py b/addons/web/common/dispatch.py
index 7a293c8228b..57e45fa594e 100644
--- a/addons/web/common/dispatch.py
+++ b/addons/web/common/dispatch.py
@@ -311,6 +311,13 @@ class Root(object):
def __init__(self, options):
self.root = werkzeug.urls.Href('/web/webclient/home')
self.config = options
+
+ if self.config.backend == 'local':
+ conn = openerplib.get_connector(protocol='local')
+ else:
+ conn = openerplib.get_connector(hostname=self.config.server_host,
+ port=self.config.server_port)
+ self.config.connector = conn
self.session_cookie = 'sessionid'
self.addons = {}