summaryrefslogtreecommitdiff
path: root/addons/web/http.py
diff options
context:
space:
mode:
authorXavier Morel <xmo@openerp.com>2013-03-13 10:49:09 +0100
committerXavier Morel <xmo@openerp.com>2013-03-13 10:49:09 +0100
commit94c2c42be6fc0bdf55421b3fe4c1d4c7db1f4bed (patch)
tree395948faff8d6874a5094dc632b238a8eff32b4e /addons/web/http.py
parenta67b8721848083a9336317139e508c338d925f73 (diff)
parentf79f6a5a25a0708e662f2deed4a54c704c6872b5 (diff)
[MERGE] from 7.0
bzr revid: xmo@openerp.com-20130313094909-u21ee88l2lak9p2x
Diffstat (limited to 'addons/web/http.py')
-rw-r--r--addons/web/http.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/addons/web/http.py b/addons/web/http.py
index ed917c00563..05069574da1 100644
--- a/addons/web/http.py
+++ b/addons/web/http.py
@@ -92,6 +92,14 @@ class WebRequest(object):
if not self.session:
self.session = session.OpenERPSession()
self.httpsession[self.session_id] = self.session
+
+ # set db/uid trackers - they're cleaned up at the WSGI
+ # dispatching phase in openerp.service.wsgi_server.application
+ if self.session._db:
+ threading.current_thread().dbname = self.session._db
+ if self.session._uid:
+ threading.current_thread().uid = self.session._uid
+
self.context = self.params.pop('context', {})
self.debug = self.params.pop('debug', False) is not False
# Determine self.lang