From b7cd70efc875031c9631cd2f6f1790c301fce5d2 Mon Sep 17 00:00:00 2001 From: Xavier-Do Date: Mon, 14 Sep 2020 14:30:00 +0000 Subject: [PATCH] [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) --- odoo/addons/base/models/ir_model.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/odoo/addons/base/models/ir_model.py b/odoo/addons/base/models/ir_model.py index adc3c3012ab..5b5d9bb99d9 100644 --- a/odoo/addons/base/models/ir_model.py +++ b/odoo/addons/base/models/ir_model.py @@ -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):