diff options
Diffstat (limited to 'odoo/modules/registry.py')
| -rw-r--r-- | odoo/modules/registry.py | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/odoo/modules/registry.py b/odoo/modules/registry.py index 4e1fe137eb5..02d1cd6e94a 100644 --- a/odoo/modules/registry.py +++ b/odoo/modules/registry.py @@ -358,6 +358,9 @@ class Registry(Mapping): - ``module``: the name of the module being installed/updated, if any; - ``update_custom_fields``: whether custom fields should be updated. """ + if not model_names: + return + if 'module' in context: _logger.info('module %s: creating or updating database tables', context['module']) elif context.get('models_to_check', False): @@ -375,6 +378,11 @@ class Registry(Mapping): model._auto_init() model.init() + env['ir.model']._reflect_models(model_names) + env['ir.model.fields']._reflect_fields(model_names) + env['ir.model.fields.selection']._reflect_selections(model_names) + env['ir.model.constraint']._reflect_constraints(model_names) + self._ordinary_tables = None while self._post_init_queue: |
