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