Vauxoo / odoo

Fork of Odoo (formerly OpenERP). [This project is not publically mantained just born for internal usage with some little patches] go to official repository on github.com/odoo/odoo
https://www.odoo.com
Other
9 stars 9 forks source link

[FIX] odoo/modules: validate vesion just for intallable modules #586

Closed isaako34 closed 7 months ago

isaako34 commented 7 months ago

Currently, the module version is being validated according to the regular expression: "^[0-9]+.[0-9]+(?:.[0-9]+)?$" in the following line:

https://github.com/odoo/odoo/blob/65ce66d4ee87db5a20d236f621ad2af3981fffe0/odoo/modules/module.py#L454

However, this validation is being performed for all modules including non-installable ones, causing the raise to be triggered when migrating non-installable modules from a version prior to version 17.

For example, let's consider the migration of the module "custom_module" from version 14.0.1.0.1 to version 17, and during the process it is changed to installable = False. However, it is not possible to initialize the database due to the validations doesn't exclude non-installable modules.

This commit validates the module versions only for installable modules.

Description of the issue/feature this PR addresses:

Current behavior before PR:

Desired behavior after PR is merged:


I confirm I have signed the CLA and read the PR guidelines at www.odoo.com/submit-pr

luisg123v commented 7 months ago

Please target odoo/odoo instead.