From 7f44a2ea6eae77913c29fddd9097432b534ef631 Mon Sep 17 00:00:00 2001 From: niv-openerp Date: Wed, 5 Jun 2013 10:42:21 +0200 Subject: [PATCH] Added request in the list of first arguments for methods to wrap bzr revid: nicolas.vanhoren@openerp.com-20130605084221-zyi54wa4ci36e2dd --- addons/web/http.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/http.py b/addons/web/http.py index a03cac4e0da..5ada5d4a68c 100644 --- a/addons/web/http.py +++ b/addons/web/http.py @@ -398,7 +398,7 @@ class ControllerType(type): if inspect.isfunction(v): spec = inspect.getargspec(v) first_arg = spec.args[1] if len(spec.args) >= 2 else None - if first_arg in ["req"]: + if first_arg in ["req", "request"]: def build_new(nv): return lambda self, *args, **kwargs: nv(self, request, *args, **kwargs) cls._methods_wrapper[k] = build_new(v)