odoo-devops-tools 1.27.1__tar.gz → 1.27.4__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (27) hide show
  1. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/PKG-INFO +165 -162
  2. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/README.md +164 -161
  3. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/odoo_devops_tools/odoo_compose.py +1137 -971
  4. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/odoo_devops_tools.egg-info/PKG-INFO +165 -162
  5. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/odoo_devops_tools.egg-info/SOURCES.txt +1 -0
  6. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/pyproject.toml +1 -1
  7. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/tests/common.py +21 -0
  8. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/tests/test_bundle.py +44 -0
  9. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/tests/test_git.py +114 -1
  10. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/tests/test_ini.py +66 -1
  11. odoo_devops_tools-1.27.4/tests/test_refactoring.py +202 -0
  12. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/LICENSE +0 -0
  13. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/odoo_devops_tools/__init__.py +0 -0
  14. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/odoo_devops_tools.egg-info/dependency_links.txt +0 -0
  15. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/odoo_devops_tools.egg-info/entry_points.txt +0 -0
  16. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/odoo_devops_tools.egg-info/top_level.txt +0 -0
  17. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/setup.cfg +0 -0
  18. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/tests/__init__.py +0 -0
  19. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/tests/conftest.py +0 -0
  20. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/tests/integration_support.py +0 -0
  21. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/tests/test_cli.py +0 -0
  22. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/tests/test_completion.py +0 -0
  23. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/tests/test_docker.py +0 -0
  24. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/tests/test_docker_source.py +0 -0
  25. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/tests/test_git_progress.py +0 -0
  26. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/tests/test_lifecycle.py +0 -0
  27. {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.4}/tests/test_venv.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: odoo-devops-tools
3
- Version: 1.27.1
3
+ Version: 1.27.4
4
4
  Summary: Build reproducible Odoo workspaces from a single project definition.
5
5
  Author: Roman Lacko
6
6
  License-Expression: MIT
@@ -208,7 +208,7 @@ odoo-compose docker setup --sync
208
208
  odoo-compose docker up --build
209
209
  ```
210
210
 
211
- The repositories are cloned into `ROOT/odoo-addons/` and bind-mounted into the Odoo container. Python dependencies from their `requirements.txt` files are included when rebuilding the Docker image.
211
+ The repositories are cloned into `ROOT/odoo-addons/` and bind-mounted into the Odoo container. Python dependencies from the selected addon directories' `requirements.txt` files are included when rebuilding the Docker image.
212
212
 
213
213
  Install the new modules:
214
214
 
@@ -414,7 +414,7 @@ Sync the addon repositories and recreate the Python environment to include their
414
414
  odoo-compose venv setup --sync --create-venv
415
415
  ```
416
416
 
417
- The repositories are cloned into `ROOT/odoo-addons/` and automatically added to the generated `addons_path`. Python dependencies from their `requirements.txt` files are included in the virtual environment.
417
+ The repositories are cloned into `ROOT/odoo-addons/` and automatically added to the generated `addons_path`. Python dependencies from the selected addon directories' `requirements.txt` files are included in the virtual environment.
418
418
 
419
419
  Install the new modules:
420
420
 
@@ -467,7 +467,7 @@ This recreates the virtual environment at `ROOT/venv` using the system Python.
467
467
 
468
468
  The `[virtualenv]` section controls additional Python dependencies used when provisioning both the native virtual environment and generated Docker images.
469
469
 
470
- Use it to add new packages, pin specific versions, and override packages collected from Odoo or addon repository `requirements.txt` files.
470
+ Use it to add new packages, pin specific versions, and override packages collected from Odoo or addon directory `requirements.txt` files.
471
471
 
472
472
  Use:
473
473
 
@@ -665,9 +665,11 @@ Container orchestration remains with Docker Compose, and its CLI can still be us
665
665
 
666
666
  ## Commands
667
667
 
668
- `odoo-compose docker` operates on Docker workspaces; `odoo-compose venv` operates on native Python virtualenv workspaces. Both use `ROOT/odoo-project.ini`, but generate their own workflow artifacts. Commands operate directly through the installed CLI; generated wrapper scripts are not required.
668
+ `odoo-compose docker` operates on Docker workspaces; `odoo-compose venv` operates on native Python virtualenv workspaces. Both use `ROOT/odoo-project.ini`, but generate their own workflow artifacts.
669
669
 
670
- Running `odoo-compose` without arguments displays help. Workspace commands require an explicit `docker` or `venv` prefix; bare commands such as `odoo-compose setup` are no longer accepted. Use `odoo-compose docker <command> --help` or `odoo-compose venv <command> --help` for command-specific help. The global `--version` option shows the installed CLI version. Use `--root ROOT` to select a workspace outside the current directory where supported.
670
+ Running `odoo-compose` without arguments displays help. Use `odoo-compose docker <command> --help` or `odoo-compose venv <command> --help` for command-specific help.
671
+
672
+ Use `--root ROOT` to select a workspace outside the current directory where supported.
671
673
 
672
674
  ### Overview
673
675
 
@@ -726,38 +728,25 @@ Running `odoo-compose` without arguments displays help. Workspace commands requi
726
728
 
727
729
  ### `setup`
728
730
 
729
- Create or update an Odoo workspace. When no project file exists, `setup` creates the default `ROOT/odoo-project.ini`; otherwise it reuses the existing configuration. Synchronizing repositories, building a virtual environment, creating bundles, and generating Docker artifacts are optional.
731
+ Create or update an Odoo workspace. When no project file exists, `setup` creates the default `ROOT/odoo-project.ini`; otherwise it reuses the existing configuration.
730
732
 
731
733
  **Usage**
732
734
 
733
735
  ```text
734
- {odoo-compose|odoo-compose venv} setup [ROOT|INI] [OPTIONS]
736
+ odoo-compose docker setup [ROOT|INI] [OPTIONS]
737
+ odoo-compose venv setup [ROOT|INI] [OPTIONS]
735
738
  ```
736
739
 
737
740
  **Arguments**
738
741
 
739
742
  <dl class="cli-reference">
740
743
  <dt><code>ROOT|INI</code></dt>
741
- <dd><p>Optional workspace directory, existing local project INI file, Git-based INI source, or URL. A directory is created if needed; an existing INI is preserved. When omitted, the current directory is the workspace root. An existing file or path ending in <code>.ini</code> is interpreted as an INI source.</p></dd>
744
+ <dd><p>Optional workspace directory, existing local project INI file, Git-based INI source, or URL. A directory is created if needed; an existing INI is preserved. When omitted, the current directory is the workspace root.
745
+ <br><br>Git source syntax: `git+REPO_URL//PATH/TO/PROJECT.ini?ref=REF`.
746
+ </p></dd>
742
747
 
743
748
  </dl>
744
749
 
745
- Alternatively, load the workspace definition from a local INI file, Git repository, or URL:
746
-
747
- ```bash
748
- # Docker workflow:
749
- odoo-compose docker setup /path/to/odoo-project.ini
750
- odoo-compose docker setup 'git+git@github.com:company/repo.git//examples/odoo-project.ini?ref=main'
751
- odoo-compose docker setup 'https://github.com/lck/odoo-devops-tools/blob/main/examples/odoo-project.ini'
752
-
753
- # Native workflow:
754
- odoo-compose venv setup /path/to/odoo-project.ini
755
- odoo-compose venv setup 'git+git@github.com:company/repo.git//examples/odoo-project.ini?ref=main'
756
- odoo-compose venv setup 'https://github.com/lck/odoo-devops-tools/blob/main/examples/odoo-project.ini'
757
- ```
758
-
759
- Git source syntax: `git+REPO_URL//PATH/TO/PROJECT.ini?ref=REF`.
760
-
761
750
  **Options**
762
751
 
763
752
  **Paths and configuration**
@@ -805,15 +794,15 @@ Git source syntax: `git+REPO_URL//PATH/TO/PROJECT.ini?ref=REF`.
805
794
  <dd><p>Explicitly select both Odoo and addon sources, regardless of the selected workflow. Unlike <code>--sync</code>, this can fetch Odoo sources even when Docker runs Odoo from the base image.</p></dd>
806
795
 
807
796
  > **Note:**
808
- > Repository sync aborts if a target Git repository has uncommitted changes **or a local branch contains commits absent from the remote branch**. Commit/stash uncommitted changes or push/reconcile unpublished commits before syncing. The four sync switches are mutually exclusive; without any of them, <code>setup</code> only regenerates artifacts and does not fetch repositories.
797
+ > Repository sync aborts if a target Git repository has uncommitted changes **or a local branch contains commits absent from the remote branch**. Commit/stash uncommitted changes or push/reconcile unpublished commits before syncing.
809
798
 
810
799
  </dl>
811
800
 
812
- **Virtualenv and bundles** (`odoo-compose venv` only where indicated)
801
+ **Virtualenv and bundles**
813
802
 
814
803
  <dl class="cli-reference">
815
804
  <dt><code>--create-venv</code></dt>
816
- <dd><p>Explicitly create or recreate <code>ROOT/venv</code> and refresh the wheelhouse (Venv only). Without a virtualenv-provisioning option, the environment is not recreated.</p></dd>
805
+ <dd><p>Explicitly create or recreate <code>ROOT/venv</code> and refresh the wheelhouse. Without a virtualenv-provisioning option, the environment is not recreated.</p></dd>
817
806
 
818
807
  <dt><code>--create-venv-from-wheelhouse</code></dt>
819
808
  <dd><p>Recreate <code>ROOT/venv</code> offline from <code>ROOT/wheelhouse/</code> and <code>all-requirements.lock.txt</code>, without compiling dependencies or rebuilding the wheelhouse.</p></dd>
@@ -822,13 +811,13 @@ Git source syntax: `git+REPO_URL//PATH/TO/PROJECT.ini?ref=REF`.
822
811
  <dd><p>Remove all items from pip's wheel cache.</p></dd>
823
812
 
824
813
  <dt><code>--create-bundle</code> <i>[BUNDLE]</i></dt>
825
- <dd><p>Create a verified portable ZIP containing sources, a sanitized project INI and the wheelhouse (Venv only). Default output: <code>ROOT/bundles/ROOT-NAME-bundle.zip</code>. Explicit relative paths are resolved from the current directory.</p></dd>
814
+ <dd><p>Create a verified portable ZIP containing sources, a sanitized project INI and the wheelhouse. Default output: <code>ROOT/bundles/ROOT-NAME-bundle.zip</code>. Explicit relative paths are resolved from the current directory.</p></dd>
826
815
 
827
816
  <dt><code>--allow-dirty-bundle</code></dt>
828
817
  <dd><p>Allow bundle creation from repositories with uncommitted changes; otherwise dirty repositories abort the operation.</p></dd>
829
818
 
830
819
  <dt><code>--create-from-bundle</code> <i>BUNDLE</i></dt>
831
- <dd><p>Verify and import a bundle into an empty <code>ROOT</code> and recreate the virtualenv from its wheelhouse (Venv only). Does not generate Docker artifacts and cannot be combined with <code>--create-docker-deploy</code>.</p></dd>
820
+ <dd><p>Verify and import a bundle into an empty <code>ROOT</code> and recreate the virtualenv from its wheelhouse. Does not generate Docker artifacts and cannot be combined with <code>--create-docker-deploy</code>.</p></dd>
832
821
 
833
822
  </dl>
834
823
 
@@ -836,7 +825,7 @@ Git source syntax: `git+REPO_URL//PATH/TO/PROJECT.ini?ref=REF`.
836
825
 
837
826
  <dl class="cli-reference">
838
827
  <dt><code>--create-docker-deploy</code></dt>
839
- <dd><p>Generate a self-contained deployment build context under <code>ROOT/docker/deploy/</code> (Docker only).</p></dd>
828
+ <dd><p>Generate a self-contained deployment build context under <code>ROOT/docker/deploy/</code>.</p></dd>
840
829
 
841
830
  </dl>
842
831
 
@@ -846,21 +835,28 @@ Git source syntax: `git+REPO_URL//PATH/TO/PROJECT.ini?ref=REF`.
846
835
  # Docker workflow:
847
836
  odoo-compose docker setup ./odoo19
848
837
  odoo-compose docker setup ./odoo18 --set odoo:version=18.0
838
+ odoo-compose docker setup 'https://github.com/lck/odoo-devops-tools/blob/main/examples/odoo-project.ini'
849
839
 
850
840
  # Native workflow:
851
841
  odoo-compose venv setup ./odoo19 --sync --create-venv
852
842
  odoo-compose venv setup ./odoo18 --set odoo:version=18.0 --sync-all --create-venv
843
+ odoo-compose venv setup 'https://github.com/lck/odoo-devops-tools/blob/main/examples/odoo-project.ini'
853
844
  ```
854
845
 
855
846
  ### `up`
856
847
 
857
- Prepare and start the selected workspace. Requires an existing `odoo-project.ini`. Docker regenerates the local Docker build context, Odoo config and `compose.yaml`, then starts services with Docker Compose; it waits for health checks. Native regenerates its configuration and starts Odoo in the background using the existing virtualenv. Neither variant automatically synchronizes repositories or rebuilds the native virtualenv.
848
+ Prepare and start the selected workspace. Requires an existing `odoo-project.ini`.
849
+
850
+ - `docker up` regenerates the local Docker build context, Odoo config and `compose.yaml`, then starts services with Docker Compose.
851
+ - `venv up` regenerates its configuration and starts Odoo in the background using the existing virtualenv.
852
+
853
+ Neither variant automatically synchronizes repositories.
858
854
 
859
855
  **Usage**
860
856
 
861
857
  ```text
862
- {odoo-compose|odoo-compose venv} up [--root ROOT]
863
858
  odoo-compose docker up [--root ROOT] [--build] [--recreate]
859
+ odoo-compose venv up [--root ROOT]
864
860
  ```
865
861
 
866
862
  **Options**
@@ -876,20 +872,18 @@ odoo-compose docker up [--root ROOT] [--build] [--recreate]
876
872
  <dd><p>Force recreation of the Odoo container, without forcing recreation of the database container (Docker only).</p></dd>
877
873
  </dl>
878
874
 
879
- **Notes**
880
-
881
- Docker `up` remembers the last applied generated Odoo configuration and recreates the Odoo container when it changes, including after a separate `setup`.
882
- Running `up` without `--build` does not guarantee that changed Python dependencies or Dockerfile instructions are built into the image.
883
- Native `up` uses `ROOT/.odt-env/odoo-process.json` for process identity and writes runtime output to `ROOT/odoo-logs/odoo-up.log`; it restarts the tracked process if the generated config changes.
884
-
885
875
  ### `down`
886
876
 
887
- Stop the selected workspace, preserving data. Docker delegates to `docker compose down` **without** `--volumes`; native gracefully stops only the verified Odoo process created by `odoo-compose venv up`.
877
+ Stop the selected workspace, preserving data.
878
+
879
+ - `docker down` delegates to `docker compose down` **without** `--volumes`.
880
+ - `venv down` gracefully stops only the verified Odoo process created by `odoo-compose venv up`.
888
881
 
889
882
  **Usage**
890
883
 
891
884
  ```text
892
- {odoo-compose|odoo-compose venv} down [--root ROOT]
885
+ odoo-compose docker down [--root ROOT]
886
+ odoo-compose venv down [--root ROOT]
893
887
  ```
894
888
 
895
889
  **Options**
@@ -899,18 +893,18 @@ Stop the selected workspace, preserving data. Docker delegates to `docker compos
899
893
  <dd><p>Select an existing workspace (default: current directory).</p></dd>
900
894
  </dl>
901
895
 
902
- **Notes**
903
-
904
- Native `down` never terminates arbitrary processes found by name or port. It does not stop PostgreSQL or a separately managed systemd service. Docker `down` removes Compose-managed containers and networks, but retains named volumes.
905
-
906
896
  ### `status`
907
897
 
908
- Show runtime status without provisioning or changing the workspace. Docker displays the Docker Compose service table; native reports the tracked Odoo PID and whether the process is still running.
898
+ Show runtime status without provisioning or changing the workspace.
899
+
900
+ - `docker status` displays the Docker Compose service table.
901
+ - `venv status` reports the tracked Odoo PID and whether the process is still running.
909
902
 
910
903
  **Usage**
911
904
 
912
905
  ```text
913
- {odoo-compose|odoo-compose venv} status [--root ROOT]
906
+ odoo-compose docker status [--root ROOT]
907
+ odoo-compose venv status [--root ROOT]
914
908
  ```
915
909
 
916
910
  **Options**
@@ -920,18 +914,18 @@ Show runtime status without provisioning or changing the workspace. Docker displ
920
914
  <dd><p>Select an existing workspace (default: current directory).</p></dd>
921
915
  </dl>
922
916
 
923
- **Notes**
924
-
925
- Native `status` verifies the recorded process identity to avoid confusing a reused PID with Odoo. It does not probe the Odoo HTTP endpoint or report application health.
926
-
927
917
  ### `run`
928
918
 
929
- Run Odoo directly from the selected workspace. Docker uses a one-off container; Venv uses the existing virtualenv and generated `odoo-server.conf`.
919
+ Run Odoo directly from the selected workspace.
920
+
921
+ - `docker run` uses a one-off container
922
+ - `venv run` uses the existing virtualenv and generated `odoo-server.conf`.
930
923
 
931
924
  **Usage**
932
925
 
933
926
  ```text
934
- {odoo-compose|odoo-compose venv} run [--root ROOT] [ODOO_ARGS...]
927
+ odoo-compose docker run [--root ROOT] [ODOO_ARGS...]
928
+ odoo-compose venv run [--root ROOT] [ODOO_ARGS...]
935
929
  ```
936
930
 
937
931
  **Arguments**
@@ -962,12 +956,16 @@ odoo-compose venv run -i base --stop-after-init
962
956
 
963
957
  ### `shell`
964
958
 
965
- Open an interactive Odoo shell. Like `run`, this uses a one-off container for Docker or the existing virtualenv for native workspaces.
959
+ Open an interactive Odoo shell.
960
+
961
+ - `docker shell` uses a one-off container.
962
+ - `venv shell` uses the existing virtualenv.
966
963
 
967
964
  **Usage**
968
965
 
969
966
  ```text
970
- {odoo-compose|odoo-compose venv} shell [--root ROOT] [ODOO_ARGS...]
967
+ odoo-compose docker shell [--root ROOT] [ODOO_ARGS...]
968
+ odoo-compose venv shell [--root ROOT] [ODOO_ARGS...]
971
969
  ```
972
970
 
973
971
  **Arguments**
@@ -986,16 +984,6 @@ Open an interactive Odoo shell. Like `run`, this uses a one-off container for Do
986
984
 
987
985
  </dl>
988
986
 
989
- **Examples**
990
-
991
- ```bash
992
- # Docker workflow:
993
- odoo-compose docker shell
994
-
995
- # Native workflow:
996
- odoo-compose venv shell
997
- ```
998
-
999
987
  ### `update`
1000
988
 
1001
989
  Update installed Odoo addons through `click-odoo-update`.
@@ -1003,7 +991,8 @@ Update installed Odoo addons through `click-odoo-update`.
1003
991
  **Usage**
1004
992
 
1005
993
  ```text
1006
- {odoo-compose|odoo-compose venv} update [--root ROOT] [--all] [ODOO_ARGS...]
994
+ odoo-compose docker update [--root ROOT] [--all] [ODOO_ARGS...]
995
+ odoo-compose venv update [--root ROOT] [--all] [ODOO_ARGS...]
1007
996
  ```
1008
997
 
1009
998
  **Arguments**
@@ -1025,16 +1014,6 @@ Update installed Odoo addons through `click-odoo-update`.
1025
1014
 
1026
1015
  </dl>
1027
1016
 
1028
- **Examples**
1029
-
1030
- ```bash
1031
- # Docker workflow:
1032
- odoo-compose docker update --all
1033
-
1034
- # Native workflow:
1035
- odoo-compose venv update --all
1036
- ```
1037
-
1038
1017
  ### `test`
1039
1018
 
1040
1019
  Run Odoo with `--test-enable --stop-after-init` in either workflow.
@@ -1042,7 +1021,8 @@ Run Odoo with `--test-enable --stop-after-init` in either workflow.
1042
1021
  **Usage**
1043
1022
 
1044
1023
  ```text
1045
- {odoo-compose|odoo-compose venv} test [--root ROOT] [ODOO_ARGS...]
1024
+ odoo-compose docker test [--root ROOT] [ODOO_ARGS...]
1025
+ odoo-compose venv test [--root ROOT] [ODOO_ARGS...]
1046
1026
  ```
1047
1027
 
1048
1028
  **Arguments**
@@ -1071,7 +1051,7 @@ odoo-compose docker test -i sale --test-tags /sale
1071
1051
  odoo-compose venv test -i sale --test-tags /sale
1072
1052
  ```
1073
1053
 
1074
- > **Docker note:** Docker commands use one-off containers. Set `ODOO_DOCKER_SUDO=1` on Linux if Docker requires `sudo`.
1054
+ > **Docker note:** Set `ODOO_DOCKER_SUDO=1` on Linux if Docker requires `sudo`.
1075
1055
 
1076
1056
  ### `backup-db`
1077
1057
 
@@ -1080,7 +1060,8 @@ Create a PostgreSQL custom-format database dump.
1080
1060
  **Usage**
1081
1061
 
1082
1062
  ```text
1083
- {odoo-compose|odoo-compose venv} backup-db [--root ROOT] [OUTPUT]
1063
+ odoo-compose docker backup-db [--root ROOT] [OUTPUT]
1064
+ odoo-compose venv backup-db [--root ROOT] [OUTPUT]
1084
1065
  ```
1085
1066
 
1086
1067
  **Arguments**
@@ -1105,24 +1086,26 @@ Create a PostgreSQL custom-format database dump.
1105
1086
  # Docker workflow:
1106
1087
  odoo-compose docker backup-db
1107
1088
 
1108
- # Native only: select a specific version of the PostgreSQL client tools
1109
- export POSTGRES_BIN=/usr/lib/postgresql/16/bin
1089
+ # Docker with sudo:
1090
+ export ODOO_DOCKER_SUDO=1
1091
+ odoo-compose docker backup-db
1110
1092
 
1093
+ # Native workflow: select a specific version of the PostgreSQL client tools:
1094
+ export POSTGRES_BIN=/usr/lib/postgresql/16/bin
1111
1095
  odoo-compose venv backup-db
1112
1096
  ```
1113
1097
 
1114
- **Native PostgreSQL configuration:** The database name comes from `[config].db_name` in `odoo-project.ini`; if missing, provisioning generates a workspace-specific name and saves it there. Connection details come from `[config]` or the standard `PG*` environment variables (`PGHOST`, `PGPORT`, `PGUSER`, `PGPASSWORD`, etc.), with `.pgpass` also supported. By default, client executables are found through `PATH`; `POSTGRES_BIN` selects their directory (`pg_dump`, `pg_restore`, `psql`, `createdb`, `dropdb`) for `odoo-compose venv` only, at command runtime.
1115
-
1116
- For Docker, the database name defaults to `odoo` when not specified.
1117
-
1118
1098
  ### `restore-db`
1119
1099
 
1120
- Restore a PostgreSQL custom-format dump into `[config].db_name` (Docker defaults to `odoo`). Stop Odoo before restoring its active database.
1100
+ Restore a PostgreSQL custom-format dump. Stop Odoo before restoring its active database.
1101
+
1102
+ An existing target database is never replaced without `--force`.
1121
1103
 
1122
1104
  **Usage**
1123
1105
 
1124
1106
  ```text
1125
- {odoo-compose|odoo-compose venv} restore-db [--root ROOT] [--force] [--copy|--move] BACKUP.dump
1107
+ odoo-compose docker restore-db [--root ROOT] [--force] [--copy|--move] BACKUP.dump
1108
+ odoo-compose venv restore-db [--root ROOT] [--force] [--copy|--move] BACKUP.dump
1126
1109
  ```
1127
1110
 
1128
1111
  **Arguments**
@@ -1158,16 +1141,13 @@ odoo-compose docker restore-db ./odoo-backups/pre-upgrade.dump
1158
1141
  odoo-compose docker restore-db --force --copy ./odoo-backups/pre-upgrade.dump
1159
1142
  odoo-compose docker restore-db --move ./odoo-backups/pre-upgrade.dump
1160
1143
 
1161
- # Native only: optionally override PostgreSQL client location
1144
+ # Native workflow: select a specific version of the PostgreSQL client tools:
1162
1145
  export POSTGRES_BIN=/usr/lib/postgresql/16/bin
1163
-
1164
1146
  odoo-compose venv restore-db ./odoo-backups/pre-upgrade.dump
1165
1147
  odoo-compose venv restore-db --force --copy ./odoo-backups/pre-upgrade.dump
1166
1148
  odoo-compose venv restore-db --move ./odoo-backups/pre-upgrade.dump
1167
1149
  ```
1168
1150
 
1169
- An existing target database is never replaced without `--force`. For native connection and client configuration, see [`backup-db`](#backup-db).
1170
-
1171
1151
  ### `backup-filestore`
1172
1152
 
1173
1153
  Archive the selected database's filestore as a `.tar.gz` file.
@@ -1175,7 +1155,8 @@ Archive the selected database's filestore as a `.tar.gz` file.
1175
1155
  **Usage**
1176
1156
 
1177
1157
  ```text
1178
- {odoo-compose|odoo-compose venv} backup-filestore [--root ROOT] [OUTPUT]
1158
+ odoo-compose docker backup-filestore [--root ROOT] [OUTPUT]
1159
+ odoo-compose venv backup-filestore [--root ROOT] [OUTPUT]
1179
1160
  ```
1180
1161
 
1181
1162
  **Arguments**
@@ -1194,18 +1175,6 @@ Archive the selected database's filestore as a `.tar.gz` file.
1194
1175
 
1195
1176
  </dl>
1196
1177
 
1197
- **Examples**
1198
-
1199
- ```bash
1200
- # Docker workflow:
1201
- odoo-compose docker backup-filestore
1202
-
1203
- # Native workflow:
1204
- odoo-compose venv backup-filestore
1205
- ```
1206
-
1207
- For native workspaces, the filestore path comes from `[config].data_dir` or defaults to `ROOT/odoo-data`. Docker accesses the filestore through a one-off Odoo container.
1208
-
1209
1178
  ### `restore-filestore`
1210
1179
 
1211
1180
  Restore the selected database's filestore from a `.tar.gz` archive. Stop Odoo before restoring an active filestore.
@@ -1213,7 +1182,8 @@ Restore the selected database's filestore from a `.tar.gz` archive. Stop Odoo be
1213
1182
  **Usage**
1214
1183
 
1215
1184
  ```text
1216
- {odoo-compose|odoo-compose venv} restore-filestore [--root ROOT] [--force] FILESTORE.tar.gz
1185
+ odoo-compose docker restore-filestore [--root ROOT] [--force] FILESTORE.tar.gz
1186
+ odoo-compose venv restore-filestore [--root ROOT] [--force] FILESTORE.tar.gz
1217
1187
  ```
1218
1188
 
1219
1189
  **Arguments**
@@ -1235,20 +1205,6 @@ Restore the selected database's filestore from a `.tar.gz` archive. Stop Odoo be
1235
1205
 
1236
1206
  </dl>
1237
1207
 
1238
- **Examples**
1239
-
1240
- ```bash
1241
- # Docker workflow:
1242
- odoo-compose docker restore-filestore ./odoo-backups/pre-upgrade-filestore.tar.gz
1243
- odoo-compose docker restore-filestore --force ./odoo-backups/pre-upgrade-filestore.tar.gz
1244
-
1245
- # Native workflow:
1246
- odoo-compose venv restore-filestore ./odoo-backups/pre-upgrade-filestore.tar.gz
1247
- odoo-compose venv restore-filestore --force ./odoo-backups/pre-upgrade-filestore.tar.gz
1248
- ```
1249
-
1250
- For native workspaces, the filestore path comes from `[config].data_dir` or defaults to `ROOT/odoo-data`. Docker accesses the filestore through a one-off Odoo container.
1251
-
1252
1208
  ### `restic`
1253
1209
 
1254
1210
  Run Restic against the configured repository. Restic supports incremental filestore snapshots and deduplication.
@@ -1256,7 +1212,8 @@ Run Restic against the configured repository. Restic supports incremental filest
1256
1212
  **Usage**
1257
1213
 
1258
1214
  ```text
1259
- {odoo-compose|odoo-compose venv} restic [--root ROOT] RESTIC_COMMAND [ARGS...]
1215
+ odoo-compose docker restic [--root ROOT] RESTIC_COMMAND [ARGS...]
1216
+ odoo-compose venv restic [--root ROOT] RESTIC_COMMAND [ARGS...]
1260
1217
  ```
1261
1218
 
1262
1219
  **Arguments**
@@ -1289,24 +1246,24 @@ odoo-compose docker restic init
1289
1246
  odoo-compose docker restic snapshots
1290
1247
  odoo-compose docker restic check
1291
1248
 
1292
- # Native only: select a Restic executable instead of using PATH
1249
+ # Native workflow: select a specific version of the Restic executable
1293
1250
  export RESTIC_BIN=/opt/restic/restic
1294
-
1295
1251
  odoo-compose venv restic init
1296
1252
  odoo-compose venv restic snapshots
1297
1253
  odoo-compose venv restic check
1298
1254
  ```
1299
1255
 
1300
- **Configuration:** Set `RESTIC_REPOSITORY` and either `RESTIC_PASSWORD_FILE` or `RESTIC_PASSWORD`. Docker invokes Restic in a one-off container and bind-mounts an absolute local host repository; remote Restic repositories are also supported. For native workspaces, Restic is found through `PATH` by default; `RESTIC_BIN` sets the executable path at command runtime and applies only to `odoo-compose venv`.
1301
-
1302
1256
  ### `backup-filestore-restic`
1303
1257
 
1304
1258
  Back up the selected database's filestore as a Restic snapshot.
1305
1259
 
1260
+ Snapshots are tagged `odoo`, `filestore` and `db:<database>`. Set `RESTIC_BACKUP_ID` for an additional `backup-id:<value>` tag; `RESTIC_HOST` overrides the default host used to group snapshots.
1261
+
1306
1262
  **Usage**
1307
1263
 
1308
1264
  ```text
1309
- {odoo-compose|odoo-compose venv} backup-filestore-restic [--root ROOT] [RESTIC_ARGS...]
1265
+ odoo-compose docker backup-filestore-restic [--root ROOT] [RESTIC_ARGS...]
1266
+ odoo-compose venv backup-filestore-restic [--root ROOT] [RESTIC_ARGS...]
1310
1267
  ```
1311
1268
 
1312
1269
  **Arguments**
@@ -1331,14 +1288,11 @@ Back up the selected database's filestore as a Restic snapshot.
1331
1288
  # Docker workflow:
1332
1289
  odoo-compose docker backup-filestore-restic
1333
1290
 
1334
- # Native only: optional Restic executable override
1291
+ # Native workflow: select a specific version of the Restic executable
1335
1292
  export RESTIC_BIN=/opt/restic/restic
1336
-
1337
1293
  odoo-compose venv backup-filestore-restic
1338
1294
  ```
1339
1295
 
1340
- Set the repository and password as described under [`restic`](#restic). Snapshots are tagged `odoo`, `filestore` and `db:<database>`. Set `RESTIC_BACKUP_ID` for an additional `backup-id:<value>` tag; `RESTIC_HOST` overrides the default host used to group snapshots.
1341
-
1342
1296
  ### `restore-filestore-restic`
1343
1297
 
1344
1298
  Restore the selected database's filestore from a Restic snapshot. Stop Odoo before restoring an active filestore.
@@ -1346,7 +1300,8 @@ Restore the selected database's filestore from a Restic snapshot. Stop Odoo befo
1346
1300
  **Usage**
1347
1301
 
1348
1302
  ```text
1349
- {odoo-compose|odoo-compose venv} restore-filestore-restic [--root ROOT] [--force] [SNAPSHOT]
1303
+ odoo-compose docker restore-filestore-restic [--root ROOT] [--force] [SNAPSHOT]
1304
+ odoo-compose venv restore-filestore-restic [--root ROOT] [--force] [SNAPSHOT]
1350
1305
  ```
1351
1306
 
1352
1307
  **Arguments**
@@ -1378,16 +1333,21 @@ odoo-compose docker restore-filestore-restic --force latest
1378
1333
  odoo-compose venv restore-filestore-restic --force latest
1379
1334
  ```
1380
1335
 
1381
- Set `RESTIC_SOURCE_DB_NAME` to restore a snapshot belonging to another database. When selecting `latest`, snapshot lookup also filters by host and the original filestore path. For repository configuration, host/tag settings and `RESTIC_BIN`, see [`restic`](#restic) and [`backup-filestore-restic`](#backup-filestore-restic).
1336
+ Set `RESTIC_SOURCE_DB_NAME` to restore a snapshot belonging to another database. When selecting `latest`, snapshot lookup also filters by host and the original filestore path.
1382
1337
 
1383
1338
  ### `neutralize`
1384
1339
 
1385
- Neutralize a restored production database for development or testing, then execute optional workspace SQL. Both workflows read `ROOT/odoo-project.ini` and do not regenerate workspace artifacts.
1340
+ Neutralize a restored production database for development or testing, then execute optional workspace neutralization scripts.
1341
+
1342
+ For **Odoo 16.0+**, the command uses Odoo's built-in neutralization.
1343
+
1344
+ For **Odoo 13.0–15.0**, it uses compatibility neutralization of scheduled actions and outgoing/incoming mail servers.
1386
1345
 
1387
1346
  **Usage**
1388
1347
 
1389
1348
  ```text
1390
- {odoo-compose|odoo-compose venv} neutralize [--root ROOT] [--dry-run [OUTPUT_DIR]]
1349
+ odoo-compose docker neutralize [--root ROOT] [--dry-run [OUTPUT_DIR]]
1350
+ odoo-compose venv neutralize [--root ROOT] [--dry-run [OUTPUT_DIR]]
1391
1351
  ```
1392
1352
 
1393
1353
  **Options**
@@ -1415,11 +1375,9 @@ odoo-compose venv neutralize --dry-run
1415
1375
  odoo-compose venv neutralize --dry-run ./preview-sql
1416
1376
  ```
1417
1377
 
1418
- **Odoo versions:** For Odoo 16.0+, the command uses Odoo's built-in neutralization and installed modules' `neutralize.sql` scripts to disable or redirect supported production-side effects (including scheduled actions, outgoing email and external integrations). For Odoo 13.0–15.0, it uses compatibility neutralization of scheduled actions and outgoing/incoming mail servers: Docker uses the Odoo ORM and Venv uses PostgreSQL commands.
1419
-
1420
- #### Workspace SQL and INI interpolation
1378
+ #### Workspace neutralization scripts
1421
1379
 
1422
- After standard neutralization, the command executes optional `*.sql` files directly inside `ROOT/neutralize/`, sorted by filename (no recursion):
1380
+ After standard neutralization, the command executes optional Workspace neutralization scripts inside `ROOT/neutralize/`, sorted by filename:
1423
1381
 
1424
1382
  ```text
1425
1383
  neutralize/
@@ -1428,7 +1386,10 @@ neutralize/
1428
1386
  └── 03-set-ir-config-params.sql
1429
1387
  ```
1430
1388
 
1431
- Execution stops at the first SQL error; if the directory is missing, only standard/legacy neutralization runs. Custom SQL accepts `${section:option}` references to the current project INI, including nested `[vars]` references. Each reference is inserted as a **quoted PostgreSQL text literal**—do **not** surround it with SQL quotes.
1389
+ Execution stops at the first SQL error; if the directory is missing, only standard/legacy neutralization runs.
1390
+
1391
+ Neutralization scripts accepts `${section:option}` references to the current project INI, including `[vars]` references.
1392
+ Each reference is inserted as a **quoted PostgreSQL text literal**—do **not** surround it with SQL quotes.
1432
1393
 
1433
1394
  `odoo-project.ini`:
1434
1395
 
@@ -1445,13 +1406,7 @@ VALUES ('web.base.url', ${vars:base_url})
1445
1406
  ON CONFLICT (key) DO UPDATE SET value = EXCLUDED.value;
1446
1407
  ```
1447
1408
 
1448
- Use `\${section:option}` to include the reference literally. Paired backslashes before `${...}` produce literal backslashes; `$` and `$$` are unchanged. Unknown references cause an error before the affected SQL file is sent to PostgreSQL. Resolved SQL is streamed to `psql` without being saved, and original SQL files are not modified. See `examples/neutralize/` for templates.
1449
-
1450
- #### SQL preview (`--dry-run`)
1451
-
1452
- Without an explicit directory, preview files are written to `ROOT/.odt-env/neutralize-preview/`. Only custom `ROOT/neutralize/*.sql` is previewed, **not** Odoo's built-in neutralization. No SQL is executed.
1453
-
1454
- > **Security note:** Preview files may contain interpolated passwords or tokens. Protect or delete them after inspection. On Unix-like systems, newly created preview SQL files have permissions `0600`.
1409
+ Use `\${section:option}` to include the reference literally. Paired backslashes before `${...}` produce literal backslashes; `$` and `$$` are unchanged.
1455
1410
 
1456
1411
  #### Restore, update and neutralize
1457
1412
 
@@ -1482,7 +1437,8 @@ Generate shell-completion definitions for either CLI. See [Shell completion](#sh
1482
1437
  **Usage**
1483
1438
 
1484
1439
  ```text
1485
- {odoo-compose|odoo-compose venv} completion {bash|zsh|fish|powershell}
1440
+ odoo-compose docker completion {bash|zsh|fish|powershell}
1441
+ odoo-compose venv completion {bash|zsh|fish|powershell}
1486
1442
  ```
1487
1443
 
1488
1444
  **Arguments**
@@ -1620,33 +1576,80 @@ path = ../odoo
1620
1576
 
1621
1577
  Addon sections are optional. You can define as many as needed.
1622
1578
 
1579
+ - `path` — local directory containing Odoo addons. Relative paths are resolved relative to `ROOT/`.
1580
+ - `repo` — Git repository URL. Required for Git-managed addons.
1581
+ - `branch` — Git branch to check out. Required for Git-managed addons.
1582
+ - `commit` — optional Git commit. When set, the repository is pinned to that exact revision.
1583
+ - `shallow` — whether to use a shallow clone. Default: `true`. Ignored when `commit` is set.
1584
+ - `subdirectory` — optional directory containing Odoo addons, relative to the Git repository root. Default: `.` (repository root). Use `/` separators on every platform. The directory must exist when used. Absolute paths, parent traversal and paths resolving outside the repository are not allowed.
1585
+
1623
1586
  Each addon must use exactly one of these source types:
1624
1587
 
1625
1588
  - local addon path: `path`
1626
- - Git repository: `repo` + `branch` (+ optional `commit` and `shallow`)
1627
-
1628
- Rules:
1589
+ - Git repository: `repo` + `branch` (+ optional `commit`, `shallow` and `subdirectory`)
1629
1590
 
1630
- - For a local addon, use only `path`.
1631
- - For a Git addon, `repo` and `branch` are required.
1632
- - `commit` is optional for a Git addon. When set, the repository is pinned to that exact revision.
1633
- - `shallow` is optional for Git addons and defaults to `true`. It is ignored when `commit` is set.
1634
- - Relative local paths are resolved relative to `ROOT/`.
1635
- - Git-based addons are cloned into `ROOT/odoo-addons/<name>/`.
1636
- - All configured addon directories are automatically appended to the generated `addons_path`.
1591
+ Git repositories are cloned into `ROOT/odoo-addons/<name>/`, and the selected addon directory is added to the generated `addons_path`.
1637
1592
 
1638
- Examples:
1593
+ Example of Git-managed addons in subdirectories:
1639
1594
 
1640
1595
  ```ini
1641
- [addons.my-custom-addons]
1642
- path = odoo-addons/my-custom-addons
1596
+ [addons.custom]
1597
+ repo = https://github.com/my-company/odoo-addons.git
1598
+ branch = ${odoo:version}
1599
+ subdirectory = addons
1643
1600
 
1644
- [addons.oca-web]
1645
- repo = https://github.com/OCA/web.git
1601
+ [addons.3rd-party-oca-web]
1602
+ repo = https://github.com/my-company/odoo-addons.git
1646
1603
  branch = ${odoo:version}
1647
- commit = abcdef1
1604
+ subdirectory = 3rd-party/oca-web
1605
+
1606
+ [addons.3rd-party-muk-it]
1607
+ repo = https://github.com/my-company/odoo-addons.git
1608
+ branch = ${odoo:version}
1609
+ subdirectory = 3rd-party/muk-it
1610
+ ```
1611
+
1612
+ Expected directory layout (relevant subdirectories only):
1613
+
1614
+ ```text
1615
+ ROOT/odoo-addons/
1616
+ ├── custom/
1617
+ │ └── addons/
1618
+ │ ├── requirements.txt
1619
+ │ ├── custom_sale/
1620
+ │ │ └── __manifest__.py
1621
+ │ └── custom_stock/
1622
+ │ └── __manifest__.py
1623
+ ├── 3rd-party-oca-web/
1624
+ │ └── 3rd-party/
1625
+ │ └── oca-web/
1626
+ │ ├── requirements.txt
1627
+ │ ├── web_environment_ribbon/
1628
+ │ │ └── __manifest__.py
1629
+ │ └── web_responsive/
1630
+ │ └── __manifest__.py
1631
+ └── 3rd-party-muk-it/
1632
+ └── 3rd-party/
1633
+ └── muk-it/
1634
+ ├── muk_ai/
1635
+ │ └── __manifest__.py
1636
+ ├── muk_ai_automation/
1637
+ │ └── __manifest__.py
1638
+ └── muk_mcp/
1639
+ └── __manifest__.py
1640
+ ```
1641
+
1642
+ Generated addon paths (excluding standard Odoo paths):
1643
+
1644
+ ```text
1645
+ ROOT/odoo-addons/custom/addons
1646
+ ROOT/odoo-addons/3rd-party-oca-web/3rd-party/oca-web
1647
+ ROOT/odoo-addons/3rd-party-muk-it/3rd-party/muk-it
1648
1648
  ```
1649
1649
 
1650
+ The same Git repository can be configured multiple times using distinct
1651
+ addon source names, branches, and subdirectories.
1652
+
1650
1653
  ### `[docker]`
1651
1654
 
1652
1655
  This section is optional.