[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:
parent
6322df1889
commit
687161f223
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue