Commit 3516b504 authored by LE GAC Renaud's avatar LE GAC Renaud
Browse files

Fix bug in list summary using history.data.key field.

parent 9f2603fd
...@@ -635,6 +635,8 @@ class List(BaseReport): ...@@ -635,6 +635,8 @@ class List(BaseReport):
if not el.dataIndex: if not el.dataIndex:
continue continue
tablename, fieldname, keyname = el.map
cfg = Storage(name=el.dataIndex) cfg = Storage(name=el.dataIndex)
# the pseudo field year # the pseudo field year
...@@ -645,9 +647,24 @@ class List(BaseReport): ...@@ -645,9 +647,24 @@ class List(BaseReport):
elif el.eval: elif el.eval:
cfg.type = 'float' cfg.type = 'float'
# json type database field
elif keyname:
xtype = el.xtype
if xtype == 'gridcolumn':
cfg.type = 'string'
elif xtype == 'booleancolumn':
cfg.type = 'boolean'
elif xtype == 'datecolumn':
cfg.type = 'date'
elif xtype == 'numbercolumn':
cfg.type = 'float'
# standard database field, extract the type from the database field # standard database field, extract the type from the database field
else: else:
tablename, fieldname, keyname = el.map
dbfield = db[tablename][fieldname] dbfield = db[tablename][fieldname]
cfg.type = dbfield.type cfg.type = dbfield.type
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment