Browse Source

[FIX] bi_sql_editor: Add required attribute name on filters

pull/323/head
hveficent 5 years ago
parent
commit
20c9567fa3
  1. 9
      bi_sql_editor/models/bi_sql_view_field.py

9
bi_sql_editor/models/bi_sql_view_field.py

@ -227,7 +227,10 @@ class BiSQLViewField(models.Model):
self.ensure_one() self.ensure_one()
res = '' res = ''
if self.field_description and self.is_group_by: 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 return res
Loading…
Cancel
Save