From 8b41933a9e87eb276ff4df56b9e7375cefd7f35c Mon Sep 17 00:00:00 2001 From: Jeremy Kersten Date: Thu, 8 Sep 2016 18:01:15 +0200 Subject: [PATCH] [FIX] web_graph: force row title to be string If the title was 'true' or 'false', the export failed, because we are tying to concat bool and str. TypeError: cannot concatenate 'str' and 'bool' objects How to reproduce, install sale, be sure to have one order with delivered = True In Reporting / Sale analysis, add a group by 'shipped' filed to have 'true' as title. This commit closes issue odoo/odoo#13425 --- addons/web_graph/controllers/main.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/web_graph/controllers/main.py b/addons/web_graph/controllers/main.py index 0899fc7271f..3265a574133 100644 --- a/addons/web_graph/controllers/main.py +++ b/addons/web_graph/controllers/main.py @@ -1,5 +1,6 @@ from openerp import http import simplejson +from openerp.tools import ustr from openerp.http import request, serialize_exception as _serialize_exception from cStringIO import StringIO from collections import deque @@ -70,7 +71,7 @@ class TableExporter(http.Controller): # Step 3: writing data x = 0 for row in jdata['rows']: - worksheet.write(y, x, row['indent'] * ' ' + row['title'], header_plain) + worksheet.write(y, x, row['indent'] * ' ' + ustr(row['title']), header_plain) for cell in row['cells']: x = x + 1 if cell.get('is_bold', False):