Browse Source

Merge PR #323 into 12.0

Signed-off-by legalsylvain
pull/321/head
OCA-git-bot 5 years ago
parent
commit
9395da11d3
  1. 11
      bi_sql_editor/models/bi_sql_view_field.py

11
bi_sql_editor/models/bi_sql_view_field.py

@ -45,7 +45,7 @@ class BiSQLViewField(models.Model):
'numeric': 'float',
'text': 'char',
'character varying': 'char',
'date': 'datetime',
'date': 'date',
'timestamp without time zone': 'datetime',
}
@ -227,7 +227,10 @@ class BiSQLViewField(models.Model):
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
Loading…
Cancel
Save