diff --git a/bin/osv/orm.py b/bin/osv/orm.py index a0473c14e8d..4dba5902739 100644 --- a/bin/osv/orm.py +++ b/bin/osv/orm.py @@ -2604,7 +2604,7 @@ class orm(orm_template): if not ok: i = 0 while True: - newname = self._table + '_moved' + str(i) + newname = k + '_moved' + str(i) cr.execute("SELECT count(1) FROM pg_class c,pg_attribute a " \ "WHERE c.relname=%s " \ "AND a.attname=%s " \