[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
This commit is contained in:
parent
6a1ecef775
commit
8b41933a9e
|
@ -1,5 +1,6 @@
|
||||||
from openerp import http
|
from openerp import http
|
||||||
import simplejson
|
import simplejson
|
||||||
|
from openerp.tools import ustr
|
||||||
from openerp.http import request, serialize_exception as _serialize_exception
|
from openerp.http import request, serialize_exception as _serialize_exception
|
||||||
from cStringIO import StringIO
|
from cStringIO import StringIO
|
||||||
from collections import deque
|
from collections import deque
|
||||||
|
@ -70,7 +71,7 @@ class TableExporter(http.Controller):
|
||||||
# Step 3: writing data
|
# Step 3: writing data
|
||||||
x = 0
|
x = 0
|
||||||
for row in jdata['rows']:
|
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']:
|
for cell in row['cells']:
|
||||||
x = x + 1
|
x = x + 1
|
||||||
if cell.get('is_bold', False):
|
if cell.get('is_bold', False):
|
||||||
|
|
Loading…
Reference in New Issue