Skip to Content

Repository update tooling

pmirepos_update.py clones or updates the Odoo-related repositories configured for one version in config/pmisetup.conf. It processes repository catalogs in parallel and writes a version-specific synchronization log to the configured repo_sync_logfile directory.

Interface

The checked-in script accepts:

Option Meaning
--version VERSION Required configuration section suffix, such as 18 for [version_18].
--config PATH Configuration file; defaults to /srv/pmiverse/_pmiconfig/config/pmisetup.conf.
--jobs N Parallel workers; defaults to 8.
--no-i18-deploy Update repositories without deploying translations; use for local authoring.

Run it from the repository root or use its repository path explicitly:

python3 scripts/update/pmirepos_update.py --version 18

The script has no --root option. Target roots, branches, catalog paths, and log directories come from the selected configuration section.

All updaters, including the retained version-specific scripts under 14/ through 18/, accept -h and --help without loading configuration, creating logs, or invoking Git. The enhanced Odoo 18 updater accepts --no-i18-deploy; other version-specific scripts accept no operational arguments. Unknown arguments are rejected. Their existing no-argument update behavior is unchanged. Bash completion is provided by the shared CLI integration.

Behavior and safety

For each catalog entry, the tool either clones the configured branch or fetches the existing repository, checks out the configured branch when necessary, and performs a fast-forward-only pull. Repository groups determine their target subdirectories under the configured project_dir.

This is a network and external-repository write operation. It can change branches and working trees in every selected checkout. Inspect the selected pmisetup.conf section and all referenced CSV catalogs, preserve unrelated changes, and obtain synchronization approval before use. The tool has no checked-in dry-run mode.

Version sections for 14 through 18 are present, but their catalog keys and paths differ. Do not infer that an option or catalog available for one version is present for another.

Odoo service installation and database module maintenance are documented in the Odoo 18 service runbook. Updating repository checkouts does not itself upgrade database modules.

For version 18, both the generic updater and the enhanced updater automatically run deploy --apply from the updated pmis-i18n-extra checkout after all workers finish. They use <project_dir>/venv/bin/python and the actual catalog-selected translation checkout path; the two updaters retain their existing group layouts. The translation configuration's source must resolve to the OCB checkout updated in the same run. Both required repositories must have updated successfully.

Commit and publish the complete translations/generated/ directory, including manifest.json and build.json, before updating remote instances. Deployment copies the verified built artifacts without remote synchronization or building. Python 3.12 or newer and polib must already be available in the suite interpreter. Missing/stale artifacts, mismatched upstream catalogs, destination ownership conflicts, and command failures are reported as deployment failures.

Deployment runs on every successful update of the two repositories, even when their revisions have not changed, so a later update retries a failed deployment. Unchanged outputs are not rewritten. If the translation repository is absent from the selected catalogs, deployment is skipped. If it is selected but OCB is missing, ambiguous, or either update fails, deployment is refused. Repository or deployment failures produce a nonzero updater exit status. Successful Git updates are retained when deployment fails; there is no cross-repository rollback. No database import, module upgrade, or service restart is performed.

For your local authoring instance, set Parameters to --no-i18-deploy in the PyCharm run configuration for enhanced_pmisuite18_update.py. Repository updates still run, while translation deployment and its artifact checks are skipped. Update failures still return a nonzero status. With the generic updater, use --version 18 --no-i18-deploy. Omit the flag on remote instances to retain automatic deployment. Locally, run sync, review/edit the catalogs, and build before committing and publishing the complete translation artifacts.

Version-specific Odoo 18 updater

18/enhanced_pmisuite18_update.py reads the [version_18] settings from config/pmisetup.conf. Its PMIVerse catalog now includes pmis-i18n-extra, so the normal repository update also clones or updates <project_dir>/repos/pmiverse/pmis-i18n-extra on the configured branch (18.0). No special-case code or additional updater command is needed.

This version-specific script uses git fetch, git checkout, and git pull for existing checkouts; unlike the generic updater above, it does not force fast-forward-only pulls. Preserve and commit local translation corrections before an approved synchronization. Adding the catalog entry does not run it.

Building i18n_extra belongs on the authoring instance; the updater deploys its committed output automatically. Database translation activation/reconciliation remains a separate maintenance step described in that repository's README and the Odoo 18 service runbook.

Update only the Odoo addons path

update_addons_path.py copies [options] addons_path from templates/config/odoo18/pmisuite18.conf in this checkout to /srv/pmiverse/_pmisuite18/config/pmisuite18.conf by default:

scripts/update/update_addons_path.py --dry-run
scripts/update/update_addons_path.py

Use --source PATH and --target PATH to select other existing files. Only the setting and its multiline continuation values are replaced. Other settings, comments, and unrelated formatting remain byte-for-byte unchanged; the target's line endings, file mode, and ownership are preserved. Symlinks are followed to their existing destination. Missing, invalid, empty, duplicate, same-file, and hard-linked write targets are refused. No service is restarted. The command requires Python 3 and write access to the target directory. Preview does not print configuration values or create files.

Focused acceptance uses synthetic files only:

PYTEST_DISABLE_PLUGIN_AUTOLOAD=1 /srv/pmiverse/_pmisuite18/venv/bin/python \
  -m pytest tests/test_update_addons_path.py -q -p no:cacheprovider

License

Copyright (c) 2025 LUXIM d.o.o. — Part of PMISuite.