Browse Source

[FIX] fix build of tree view

pull/59/head
jbeficent 9 years ago
committed by Andrea
parent
commit
757e543fe4
  1. 11
      bi_view_editor/models/bve_view.py

11
bi_view_editor/models/bve_view.py

@ -117,9 +117,14 @@ class BveView(models.Model):
def _create_tree_view(self): def _create_tree_view(self):
fields_info = json.loads(self.data) fields_info = json.loads(self.data)
view = ["""<field name="x_{}"/>""".format(field_info['name'])
for field_info in fields_info if field_info['name']]
return view
view_fields = ["""<field name="x_{}" type="{}" />""".format(
field_info['name'],
(field_info['row'] and 'row') or
(field_info['column'] and 'col') or
(field_info['measure'] and 'measure'))
for field_info in fields_info if field_info['row'] or
field_info['column'] or field_info['measure']]
return view_fields
@api.multi @api.multi
def action_create(self): def action_create(self):

Loading…
Cancel
Save