From c44f6ffd618e0509047ece95bee01a0121c91f97 Mon Sep 17 00:00:00 2001 From: jbm-odoo Date: Wed, 3 Apr 2019 09:31:18 +0000 Subject: [PATCH] [IMP] registry.py: Log info instead of warning about dropped view during installation This problem appears when the module l10n_be_hr_payroll_fleet is installed with the dynamic report for employees (enterprise module hr_contract_reports). This module inherits from hr.contract and will create and modify some fields. By modifying contract's table, PostgreSQL will drop the view from hr_contract_employee_report. At the end of the installation, PostgreSQL will check if tables exist, it isn't the case for the view from hr_contract_employee_report, so it will recreate it. It's the normal behavior. But when a table is missing, a warning is logged and create problem with Runbot. For this reason, it's better to log an Info and not a Warning message. Validated with @rco --- odoo/modules/registry.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/odoo/modules/registry.py b/odoo/modules/registry.py index f9bbe119dc4..abdcc3cc240 100644 --- a/odoo/modules/registry.py +++ b/odoo/modules/registry.py @@ -316,7 +316,7 @@ class Registry(Mapping): if missing_tables: missing = {table2model[table] for table in missing_tables} - _logger.warning("Models have no table: %s.", ", ".join(missing)) + _logger.info("Models have no table: %s.", ", ".join(missing)) # recreate missing tables following model dependencies deps = {name: model._depends for name, model in env.items()} for name in topological_sort(deps):