[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:
+1
-1
@@ -2127,7 +2127,7 @@ class BaseModel(object):
|
|||||||
prefix_term = lambda prefix, term: ('%s %s' % (prefix, term)) if term else ''
|
prefix_term = lambda prefix, term: ('%s %s' % (prefix, term)) if term else ''
|
||||||
|
|
||||||
query = """
|
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
|
FROM %(from)s
|
||||||
%(where)s
|
%(where)s
|
||||||
%(groupby)s
|
%(groupby)s
|
||||||
|
|||||||
Reference in New Issue
Block a user