From 34022a35aa3d198e0314cecb3edbf7c07fbcdb41 Mon Sep 17 00:00:00 2001 From: Victor Feyens Date: Mon, 31 Jan 2022 12:34:08 +0000 Subject: [PATCH] [IMP] core: do not log 'loading demo' for nothing when there is no demo data available for the given module closes odoo/odoo#83675 Signed-off-by: Victor Feyens (vfe) --- odoo/modules/loading.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/odoo/modules/loading.py b/odoo/modules/loading.py index 104c269d7d2..d192893b236 100644 --- a/odoo/modules/loading.py +++ b/odoo/modules/loading.py @@ -81,9 +81,10 @@ def load_demo(cr, package, idref, mode): return False try: - _logger.info("Module %s: loading demo", package.name) - with cr.savepoint(flush=False): - load_data(cr, idref, mode, kind='demo', package=package) + if package.data.get('demo') or package.data.get('demo_xml'): + _logger.info("Module %s: loading demo", package.name) + with cr.savepoint(flush=False): + load_data(cr, idref, mode, kind='demo', package=package) return True except Exception as e: # If we could not install demo data for this module