[FIX] openerp: quote read_group SQL query for case sensitive tables

In SQL, if there is no quote around the table/field, the result will
be returned as case insensitive.

This was causing a bug in the kanban view which was not displaying
the records because x_AA_count was named x_aa_count.
This commit is contained in:
mge-odoo 2017-02-08 15:51:22 +01:00
parent 51cf2852d8
commit 8cb13c4e4c
1 changed files with 1 additions and 1 deletions

View File

@ -2127,7 +2127,7 @@ class BaseModel(object):
prefix_term = lambda prefix, term: ('%s %s' % (prefix, term)) if term else ''
query = """
SELECT min(%(table)s.id) AS id, count(%(table)s.id) AS %(count_field)s %(extra_fields)s
SELECT min("%(table)s".id) AS id, count("%(table)s".id) AS "%(count_field)s" %(extra_fields)s
FROM %(from)s
%(where)s
%(groupby)s