= Wheel version

== Classic python package

Like in any `pyproject.toml` you can add a version to your package with the field `version` in the section `[project]`.

.pyproject.toml
[source,toml]
----
[project]
name = "awesome-odoo-addon"
classifiers = [
    "Private :: Do Not Upload"
]
version = "1.1.0" # <1>

dependencies = [ ]
----
<1> Version of the wheel, must be the same than in `{manifest}`

[IMPORTANT]
====
Name of the wheel: `awsome-odoo-addon-1.1.0-py3-none-any.whl`
Odoo in dependencies: **Not set**
====

[NOTE]
====
The version of the `{manifest}` is not used and not changed. +
Odoo only see the version in `{manifest}`. To use migration script you need to change the value in `{manifest}` too.
====

== Dynamic using `version` from `{manifest}`

You can follow the version of the addon `{manifest}`. +
To do that you need to set de field `version` in the `dynamic` field.

.pyproject.toml
[source,toml]
----
[build-system]
requires = ["addon-odoo-wheel"]
build-backend = "addon_odoo_wheel.builder"


[project]
name = "awesome-odoo-addon"
dynamic = ["version"] # <1>
# ...
----
<1> Tell to `{page-component-name}` to use the version in `{manifest}`

.__manifest__.py
[source,python]
----
{
    "name": "Sample Module",
    "version": "18.0.1.1.0", # <1>
    # ...
}
----
<1> 5 digits version used to force odoo series


[IMPORTANT]
====
Name of the wheel: `awsome-odoo-addon-18.0.1.1.0-py3-none-any.whl`
Odoo in dependencies: `odoo>=18.0,<19.0`
====

NOTE: If the version of the `{manifest}` start with the version (The tow first part of the version) of the Odoo series then the correct Odoo version is add as dependencies.
