From c17170b9c12277d32ef759ad5dc0783da8a6f516 Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Wed, 21 Mar 2018 11:36:42 +0100 Subject: [PATCH] [FIX] web: all routes should have **kw to support utm/extra params Without this commit, a valid route /web/content with an extra params eg utm or adwords will return a 500 with: TypeError: content_common() got an unexpected keyword argument 'extra_param_name' This commit closes #21221 Task-32836 should fix for all routes in a future version --- addons/web/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web/controllers/main.py b/addons/web/controllers/main.py index 2a63740d424..438295e6233 100644 --- a/addons/web/controllers/main.py +++ b/addons/web/controllers/main.py @@ -962,7 +962,7 @@ class Binary(http.Controller): '/web/content/-/', '/web/content///', '/web/content////'], type='http', auth="public") - def content_common(self, xmlid=None, model='ir.attachment', id=None, field='datas', filename=None, filename_field='datas_fname', unique=None, mimetype=None, download=None, data=None, token=None): + def content_common(self, xmlid=None, model='ir.attachment', id=None, field='datas', filename=None, filename_field='datas_fname', unique=None, mimetype=None, download=None, data=None, token=None, **kw): status, headers, content = binary_content(xmlid=xmlid, model=model, id=id, field=field, unique=unique, filename=filename, filename_field=filename_field, download=download, mimetype=mimetype) if status == 304: response = werkzeug.wrappers.Response(status=status, headers=headers)