Custom migration scripts for a core module used to require copying the whole module into ``versions/18.0/addons/`` so its ``migrations/`` folder would be picked up. Because the migration container mounts that copy with priority (``--addons-path=mig,addons``) and ``get_module_path`` returns the first match, the copy fully shadowed the core module — dragging along its entire data/models just to carry one script. Instead, inject the scripts through a dedicated OpenUpgrade ``upgrade_path``: - New ``versions/18.0/scripts/l10n_fr_account/18.0.2.2/`` holding ``pre-migration-0k-fix-orphan-expressions.py`` (converted to the ``@openupgrade.migrate()`` / ``migrate(env, version)`` convention) and ``post-migration-0k-vat-box25.py`` + ``noupdate_changes.xml`` that reapply the box 25 VAT-report customization via ``openupgrade.load_data``. - ``config/compose.yml``: mount it as ``/opt/odoo/auto/upgrade`` for ou18. - ``versions/18.0/upgrade.sh``: pass ``--upgrade-path=/opt/odoo/auto/upgrade,/opt/odoo/auto/addons/openupgrade_scripts/scripts``. Odoo appends every path to ``odoo.upgrade.__path__`` and concatenates the per-version scripts, so our scripts run IN ADDITION to the native ones; the native path is listed explicitly because ``--upgrade-path`` overrides ``config['upgrade_path']`` which ``openupgrade_framework`` only sets when empty. Files are named with a ``-0k-`` marker so they never collide with the native ``pre-migration.py`` / ``post-migration.py``. This removes the need for the shadowing module copy entirely. Also ignore ``__pycache__``/``*.pyc``.
94 lines
2.6 KiB
YAML
94 lines
2.6 KiB
YAML
ou12:
|
|
charm: odoo-tecnativa
|
|
docker-compose:
|
|
image: docker.0k.io/mirror/odoo:rc_12.0-MYC-INIT-3.7
|
|
## Important to keep as a list: otherwise it'll overwrite charm's arguments.
|
|
command:
|
|
- "--log-level=debug"
|
|
- "--limit-time-cpu=1000000"
|
|
- "--limit-time-real=1000000"
|
|
options:
|
|
workers: 0
|
|
|
|
ou13:
|
|
charm: odoo-tecnativa
|
|
docker-compose:
|
|
image: docker.0k.io/mirror/odoo:rc_13.0-MYC-INIT-OU
|
|
## Important to keep as a list: otherwise it'll overwrite charm's arguments.
|
|
command:
|
|
- "--log-level=debug"
|
|
- "--limit-time-cpu=1000000"
|
|
- "--limit-time-real=1000000"
|
|
options:
|
|
workers: 0
|
|
|
|
|
|
ou14:
|
|
charm: odoo-tecnativa
|
|
docker-compose:
|
|
image: docker.0k.io/mirror/odoo:rc_14.0-MYC-INIT
|
|
## Important to keep as a list: otherwise it'll overwrite charm's arguments.
|
|
command:
|
|
- "--log-level=debug"
|
|
- "--limit-time-cpu=1000000"
|
|
- "--limit-time-real=1000000"
|
|
options:
|
|
workers: 0
|
|
|
|
|
|
ou15:
|
|
charm: odoo-tecnativa
|
|
docker-compose:
|
|
image: docker.0k.io/mirror/odoo:rc_15.0-MYC-INIT
|
|
#image: docker.0k.io/mirror/odoo/rc_15.0-myc-init-20241007-092844-0f8b8b
|
|
## Important to keep as a list: otherwise it'll overwrite charm's arguments.
|
|
command:
|
|
- "--log-level=debug"
|
|
- "--limit-time-cpu=1000000"
|
|
- "--limit-time-real=1000000"
|
|
options:
|
|
workers: 0
|
|
|
|
ou16:
|
|
charm: odoo-tecnativa
|
|
docker-compose:
|
|
image: docker.0k.io/mirror/odoo:rc_16.0-ELABORE-LIGHT
|
|
## Important to keep as a list: otherwise it'll overwrite charm's arguments.
|
|
command:
|
|
- "--log-level=debug"
|
|
- "--limit-time-cpu=1000000"
|
|
- "--limit-time-real=1000000"
|
|
options:
|
|
workers: 0
|
|
|
|
ou17:
|
|
charm: odoo-tecnativa
|
|
docker-compose:
|
|
image: docker.0k.io/mirror/odoo:rc_17.0-MYC-INIT
|
|
## Important to keep as a list: otherwise it'll overwrite charm's arguments.
|
|
command:
|
|
- "--log-level=debug"
|
|
- "--limit-time-cpu=1000000"
|
|
- "--limit-time-real=1000000"
|
|
options:
|
|
workers: 0
|
|
|
|
ou18:
|
|
charm: odoo-tecnativa
|
|
docker-compose:
|
|
image: docker.0k.io/mirror/odoo:rc_18.0-ELABORE-LIGHT
|
|
## Important to keep as a list: otherwise it'll overwrite charm's arguments.
|
|
command:
|
|
- "--log-level=debug"
|
|
- "--limit-time-cpu=1000000"
|
|
- "--limit-time-real=1000000"
|
|
volumes:
|
|
- /home/stephan/dev/Odoo/0k-odoo-upgrade/versions/18.0/addons/:/opt/odoo/auto/mig:rw
|
|
- /home/stephan/dev/Odoo/0k-odoo-upgrade/versions/18.0/scripts/:/opt/odoo/auto/upgrade:rw
|
|
options:
|
|
workers: 0
|
|
|
|
postgres:
|
|
docker-compose:
|
|
image: docker.0k.io/postgres:17.2.0-myc
|