[MERGE] forward port branch 9.0 up to eaddb7caff

This commit is contained in:
Christophe Simonis
2017-03-06 13:09:17 +01:00
+2 -4
View File
@@ -113,10 +113,8 @@ class IrModel(models.Model):
for model in self:
if model.state != 'manual':
raise UserError(_("Model '%s' contains module data and cannot be removed!") % model.name)
# prevent screwing up fields that depend on these models' fields
for model in self:
model.field_id._prepare_update()
# prevent screwing up fields that depend on these models' fields
model.field_id._prepare_update()
self._drop_table()
res = super(IrModel, self).unlink()