[IMP] base: remove dead code

Was fixed at 07510cdb
Code no longer needed

Closes #21322
This commit is contained in:
Miquel Raïch
2018-03-01 17:16:53 +01:00
committed by Martin Trigaux
parent 8767ecc693
commit 4534f6623e
-8
View File
@@ -305,14 +305,6 @@ class Module(models.Model):
if module.state in ('installed', 'to upgrade', 'to remove', 'to install'):
raise UserError(_('You try to remove a module that is installed or will be installed'))
self.clear_caches()
# Installing a module creates entries in base.module.uninstall, during
# the unlink process of ir.module.module we try to update the
# base.module.uninstall table's module_id to null, which violates a
# non-null constraint, effectively raising an Exception.
# V11-only !!DO NOT FORWARD-PORT!!
self.env['base.module.uninstall'].search(
[('module_id', 'in', self.ids)]
).unlink()
return super(Module, self).unlink()
@staticmethod