[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:
parent
51cf2852d8
commit
8cb13c4e4c
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue