Added request in the list of first arguments for methods to wrap

bzr revid: nicolas.vanhoren@openerp.com-20130605084221-zyi54wa4ci36e2dd
This commit is contained in:
niv-openerp 2013-06-05 10:42:21 +02:00
parent 7735db7202
commit 7f44a2ea6e
1 changed files with 1 additions and 1 deletions

View File

@ -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)