From baef529cbd9daf1f53dcdd8e4fe9ba5dbabd52c2 Mon Sep 17 00:00:00 2001 From: qsm-odoo Date: Thu, 18 Aug 2016 09:15:11 +0200 Subject: [PATCH] [FIX] web_editor: keep all debug values for FieldTextHtml Commit 89a4774c21b9187ada4b9c317fe3b5a756b0abf4 changed the kwargs debug value of the FieldTextHtml controller to let it be equal to "assets" instead of True or False. The problem is that an empty string was considered True before the commit and False afterwards. In fact, the original code was wrong and the debug value should equal the already processed kwargs debug value in the HttpRequest object. Indeed, the kwargs.debug value is equal to the URL value while the request.debug value is already processed and is only one of the 3 values: None, True or "assets". --- addons/web_editor/controllers/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/web_editor/controllers/main.py b/addons/web_editor/controllers/main.py index 66d700f55c5..f7f548a75c9 100644 --- a/addons/web_editor/controllers/main.py +++ b/addons/web_editor/controllers/main.py @@ -32,7 +32,7 @@ class Web_Editor(http.Controller): res_id=res_id, field=field, datarecord=json.loads(kwargs['datarecord']), - debug=kwargs.get('debug')) + debug=request.debug) for k in kwargs: if isinstance(kwargs[k], basestring) and kwargs[k].isdigit():