summaryrefslogtreecommitdiff
path: root/odoo/fields.py
diff options
context:
space:
mode:
authorRaphael Collet <rco@odoo.com>2019-08-26 13:38:17 +0000
committerRaphael Collet <rco@odoo.com>2019-08-26 13:39:16 +0000
commitc7f5c4afd2099f951dfe433ab18716062b2843db (patch)
treed16605195cdebbc2b5a9868986a08ca6870a13b2 /odoo/fields.py
parenteafdf1812d3ef545400bf9f6acd6842de807a33a (diff)
[FIX] sql_db: add flush() in savepoint()
closes odoo/odoo#36060 Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
Diffstat (limited to 'odoo/fields.py')
-rw-r--r--odoo/fields.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/odoo/fields.py b/odoo/fields.py
index 68df3329a42..f05fccd8a06 100644
--- a/odoo/fields.py
+++ b/odoo/fields.py
@@ -951,7 +951,7 @@ class Field(MetaField('DummyField', (object,), {})):
indexname = '%s_%s_index' % (model._table, self.name)
if self.index:
try:
- with model._cr.savepoint():
+ with model._cr.savepoint(flush=False):
sql.create_index(model._cr, indexname, model._table, ['"%s"' % self.name])
except psycopg2.OperationalError:
_schema.error("Unable to add index for %s", self)