[FIX] web_editor: keep all debug values for FieldTextHtml

Commit 89a4774c21 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".
This commit is contained in:
qsm-odoo
2016-08-18 09:27:05 +02:00
parent 89a4774c21
commit baef529cbd
+1 -1
View File
@@ -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():