Skip to content

Commit

Permalink
Merge 9eb6989 into ba3e77f
Browse files Browse the repository at this point in the history
  • Loading branch information
HviorForgeFlow committed Sep 13, 2019
2 parents ba3e77f + 9eb6989 commit f267114
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
3 changes: 3 additions & 0 deletions bi_sql_editor/models/bi_sql_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,9 @@ def button_set_draft(self):
# Drop ORM
sql_view._drop_model_and_fields()

# Drop BI SQL View Fields:
sql_view.bi_sql_view_field_ids.unlink()

sql_view.write({'state': 'draft', 'has_group_changed': False})

@api.multi
Expand Down
9 changes: 6 additions & 3 deletions bi_sql_editor/models/bi_sql_view_field.py
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,10 @@ def _prepare_search_filter_field(self):
self.ensure_one()
res = ''
if self.field_description and self.is_group_by:
res =\
"""<filter string="%s" context="{'group_by':'%s'}"/>""" % (
self.field_description, self.name)
res = \
"""<filter name="%s" string="%s"
context="{'group_by':'%s'}"/>""" % (
self.field_description.lower().replace(' ', '_'),
self.field_description, self.name
)
return res

0 comments on commit f267114

Please sign in to comment.