Skip to content
Snippets Groups Projects
Commit 8b41933a authored by Jeremy Kersten's avatar Jeremy Kersten
Browse files

[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
parent 6a1ecef7
No related branches found
No related tags found
No related merge requests found
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):
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment