[FIX] crm: columns and tables in upper cases

The module studio gives the abality to name columns or tables with
upper cases. So making the SQL case sensitive avoids problems with studio.

opw:770022
This commit is contained in:
Goffin Simon
2017-09-12 15:37:47 +02:00
parent d20388ba1a
commit 94eb69907d
+1 -1
View File
@@ -199,7 +199,7 @@ class MergePartnerAutomatic(models.TransientModel):
except psycopg2.Error:
# updating fails, most likely due to a violated unique constraint
# keeping record with nonexistent partner_id is useless, better delete it
query = 'DELETE FROM %(table)s WHERE %(column)s IN %%s' % query_dic
query = 'DELETE FROM "%(table)s" WHERE "%(column)s" IN %%s' % query_dic
self._cr.execute(query, (tuple(src_partners.ids),))
@api.model