diff options
| author | Adrian Torres <adt@odoo.com> | 2018-10-18 13:35:06 +0000 |
|---|---|---|
| committer | Adrian Torres <adt@odoo.com> | 2018-10-19 07:42:30 +0000 |
| commit | 0ac93c38283b0d2f065f8336fd1e2f6a6dedfc19 (patch) | |
| tree | e1d62cf21dbd808924238777ae22d3bd37426bb6 /odoo/modules/loading.py | |
| parent | 6e97e354d80455f75458aa4f3d802bfb632d9df0 (diff) | |
[FIX] loading: set dbdemo if demo install success
opw-1896028
closes odoo/odoo#27945
Diffstat (limited to 'odoo/modules/loading.py')
| -rw-r--r-- | odoo/modules/loading.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/odoo/modules/loading.py b/odoo/modules/loading.py index 962559190c8..bc95e1c461d 100644 --- a/odoo/modules/loading.py +++ b/odoo/modules/loading.py @@ -103,6 +103,7 @@ def force_demo(cr): Forces the `demo` flag on all modules, and installs demo data for all installed modules. """ graph = odoo.modules.graph.Graph() + cr.execute('UPDATE ir_module_module SET demo=True') cr.execute( "SELECT name FROM ir_module_module WHERE state IN ('installed', 'to upgrade', 'to remove')" ) @@ -112,7 +113,6 @@ def force_demo(cr): for package in graph: load_demo(cr, package, {}, 'init') - cr.execute('update ir_module_module set demo=%s', (True,)) env = api.Environment(cr, SUPERUSER_ID, {}) env['ir.module.module'].invalidate_cache(['demo']) |
