diff --git a/openerp/http.py b/openerp/http.py index 12ca2e28f84..dce6992c5dc 100644 --- a/openerp/http.py +++ b/openerp/http.py @@ -798,8 +798,10 @@ class LazyResponse(werkzeug.wrappers.Response): """ Lazy werkzeug response. API not yet frozen""" - def __init__(self, callback, **kwargs): + def __init__(self, callback, status_code=None, **kwargs): super(LazyResponse, self).__init__(mimetype='text/html') + if status_code: + self.status_code = status_code self.callback = callback self.params = kwargs def process(self):