[MERGE] latest trunk

bzr revid: abo@openerp.com-20120824085801-0tr9lajdtiwtpvwr
This commit is contained in:
Antonin Bourguignon
2012-08-24 10:58:01 +02:00
2 changed files with 2 additions and 7 deletions
@@ -45,7 +45,6 @@ class ir_model_constraint(Model):
ids_set = set(ids)
ids.sort()
ids.reverse()
to_unlink = []
for data in self.browse(cr, uid, ids, context):
model = data.model.model
model_obj = self.pool.get(model)
@@ -75,5 +74,4 @@ class ir_model_constraint(Model):
cr.execute('ALTER TABLE "%s" DROP CONSTRAINT "%s"' % (model_obj._table, name),)
_logger.info('Dropped CONSTRAINT %s@%s', name, model)
to_unlink.append(data.id)
self.unlink(cr, uid, to_unlink, context)
self.unlink(cr, uid, ids, context)
+1 -4
View File
@@ -36,7 +36,6 @@ class ir_model_relation(Model):
to_drop_table = []
ids.sort()
ids.reverse()
to_unlink = []
for data in self.browse(cr, uid, ids, context):
model = data.model
model_obj = self.pool.get(model)
@@ -53,9 +52,7 @@ class ir_model_relation(Model):
if cr.fetchone() and not name in to_drop_table:
to_drop_table.append(name)
to_unlink.append(data.id)
self.unlink(cr, uid, to_unlink, context)
self.unlink(cr, uid, ids, context)
# drop m2m relation tables
for table in to_drop_table: