[FIX] base: consider materialized view as table

Closes #18442
opw-769167
This commit is contained in:
Adrien Peiffer (ACSONE)
2017-08-31 15:00:22 +02:00
committed by Nicolas Martinelli
parent 0fff391c38
commit 4ca6945256
+1 -1
View File
@@ -2589,7 +2589,7 @@ class BaseModel(object):
@api.model_cr
def _table_exist(self):
query = "SELECT relname FROM pg_class WHERE relkind IN ('r','v') AND relname=%s"
query = "SELECT relname FROM pg_class WHERE relkind IN ('r','v','m') AND relname=%s"
self._cr.execute(query, (self._table,))
return self._cr.rowcount