From 687161f2232e6e2c270966e8136bcd8a9bec0f9a Mon Sep 17 00:00:00 2001 From: Christophe Simonis Date: Tue, 15 Oct 2013 11:07:19 +0200 Subject: [PATCH] [FIX] web: re-add registry_cr() method on request to be compatible with saas-1 branch bzr revid: chs@openerp.com-20131015090719-kw3ywyqix5ejcsak --- addons/web/http.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/addons/web/http.py b/addons/web/http.py index b02a83ee746..4f27fb51a36 100644 --- a/addons/web/http.py +++ b/addons/web/http.py @@ -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