[IMP] core: remove _drop_table model not exist warning

This warning is unlikely to be triggered during an install, and is problematic
during an upgrade since upgrade scripts will already do the same check but are
able to manage exceptions. The log is kept in log 25 for debuging/monitoring.

closes odoo/odoo#57667

Signed-off-by: Raphael Collet (rco) <rco@openerp.com>
This commit is contained in:
Xavier-Do
2020-09-14 14:30:43 +00:00
parent 9cb19f3624
commit b7cd70efc8
+1 -4
View File
@@ -275,10 +275,7 @@ class IrModel(models.Model):
WHERE type IN ('model', 'model_terms') AND name LIKE %s
""", [model.model + ',%'])
else:
# do not warn in the case of a test module
module = self.env.context.get('module', '')
if not module.startswith('test_'):
_logger.warning('The model %s could not be dropped because it did not exist in the registry.', model.model)
_logger.runbot('The model %s could not be dropped because it did not exist in the registry.', model.model)
return True
def unlink(self):