Skip to Content
Menu
Musisz się zarejestrować, aby móc wchodzić w interakcje z tą społecznością.
To pytanie dostało ostrzeżenie
2 Odpowiedzi
9243 Widoki

Hi,

I was wondering if anyone could provide some advice on how they approach patching their custom modules.

I understand that that odoo provides the ability to run migrations when you increase the version number of your module. This suggests that new version numbers should be reserved for significant changes to your module (e.g., changing models properties and methods). However, what sort of conventions are there around implementing small changes? Is it possible to specify a patch version for a module?

I would like to be able to uniquely identify each version I release to production using a Maj.Min.Patch format for the version numbers. Is this possible?

Thanks,

Tyler

Awatar
Odrzuć
Najlepsza odpowiedź
Hi Tyler Kowalczik,

From my understanding, you are looking for how does version number works.

This is the rules for giving the version number.

Note: whenever you change version, you have to add a record in changelog.rst

The version number in the module manifest should be the Odoo major version (e.g. 8.0) followed by the module x.y.z

version numbers. For example, 8.0.1.0.0 is expected for the first release of an 8.0 module.

The x.y.z version numbers follow the semantics breaking.feature.fix:

• x increments when the data model or the views had significant changes. Data migration might be needed, or

depending modules might be affected.

• y increments when non-breaking new features are added. A module upgrade will probably be needed.

• z increments when bugfixes were made. Usually, a server restart is needed for the fixes to be made available.

If applicable, breaking changes are expected to include instructions or scripts to perform the migration on current installations.

If a module ported to different odoo versions (e.g. 8 and 9) and some update is added only to one version (e.g. 9), then

the version is changed as in the example below:

• init

– 8.0.1.0.0

– 9.0.1.0.0

• feature added to 8.0 and ported to 9.0

– 8.0.1.1.0

– 9.0.1.1.0

• feature added to 9.0 only and not going to be ported to 8.0:

– 8.0.1.1.0

– 9.0.1.2.0

• fix made in 9.0 only and not going to be ported to 8.0:

– 8.0.1.1.0

– 9.0.1.2.1

• fix made in 8.0 and ported to 9.0

– 8.0.1.2.2

– 9.0.1.2.2

i.e. two module branches cannot have same versions with a different meaning

Credits: https://media.readthedocs.org/pdf/odoo-development/latest/odoo-development.pdf

Maybe it will help you.
Thank you.
Awatar
Odrzuć
Autor

Thanks for your response. It is very informative.

So when using the x.y.z versioning scheme, odoo will only run migrations when the "x" portion of the version is incremented, right?

Najlepsza odpowiedź

helpful answer :)

Awatar
Odrzuć
Powiązane posty Odpowiedzi Widoki Czynność
ODOO 18 Upgrade Rozwiązane
2
cze 25
8371
0
lip 22
1616
1
paź 17
5100
1
lut 17
4981
1
kwi 15
4134