Impacted versions:

11.0 (saas)

Steps to reproduce:

- Create a simple module, ser version to 1.0
- Import it using odoo studio.
- Check the version (11.0.1.0)
- Change the version.
- Import it again (or even un-install it and install it again if you wish)

Current behavior:

- Version is yet 11.0.1.0

Expected behavior:

- Take the proper version from the module itself

Video/Screenshot link (optional):


addons/base_import_module/models/ir_module.py
if unmet_dependencies:
            if (unmet_dependencies == set(['web_studio']) and
                    _is_studio_custom(path)):
                err = _("Studio customizations require Studio")
            else:
                err = _("Unmet module dependencies: %s") % ', '.join(
                    unmet_dependencies,
                )
            raise UserError(err)
        elif 'web_studio' not in installed_mods and _is_studio_custom(path):
            raise UserError(_("Studio customizations require Studio"))
        mod = known_mods_names.get(module)
        if mod:
            mod.write(dict(state='installed', **values))
            mode = 'update' if not force else 'init'
        else:
            assert terp.get('installable', True), "Module not installable"
            self.create(dict(name=module, state='installed', imported=True, **values))
            mode = 'init'
        for kind in ['data', 'init_xml', 'update_xml']:
            for filename in terp[kind]:
                ext = os.path.splitext(filename)[1].lower()
                if ext not in ('.xml', '.csv', '.sql'):
                    _logger.info("module %s: skip unsupported file %s", module, filename)
                    continue
                _logger.info("module %s: loading %s", module, filename)
                noupdate = False
                if ext == '.csv' and kind in ('init', 'init_xml'):
                    noupdate = True
                pathname = opj(path, filename)