[imp] re used context retreival

bzr revid: nicolas.vanhoren@openerp.com-20120106101619-d0po1e513o2gti2b
This commit is contained in:
niv-openerp
2012-01-06 11:16:19 +01:00
parent 666ed25b4d
commit 7fb8b668a5
+1 -2
View File
@@ -107,8 +107,7 @@ class OpenERPSession(object):
:returns: the new context
"""
assert self._uid, "The user needs to be logged-in to initialize his context"
self.context = self.model('res.users').context_get(self.context)
self.context = self.context or {}
self.context = self.build_connection().get_user_context() or {}
return self.context