[FIX] web: re-add registry_cr() method on request to be compatible with saas-1 branch

bzr revid: chs@openerp.com-20131015090719-kw3ywyqix5ejcsak
This commit is contained in:
Christophe Simonis 2013-10-15 11:07:19 +02:00
parent 6322df1889
commit 687161f223
1 changed files with 5 additions and 0 deletions

View File

@ -21,6 +21,7 @@ import urlparse
import uuid
import errno
import re
import warnings
import babel.core
import simplejson
@ -181,6 +182,10 @@ class WebRequest(object):
def debug(self):
return 'debug' in self.httprequest.args
@contextlib.contextmanager
def registry_cr(self):
warnings.warn('please use request.registry and request.cr directly', DeprecationWarning)
yield (self.registry, self.cr)
def auth_method_user():
request.uid = request.session.uid