odoo-devops-tools 1.27.0__tar.gz → 1.27.3__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 (28) hide show
  1. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/PKG-INFO +104 -150
  2. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/README.md +103 -147
  3. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/odoo_devops_tools/odoo_compose.py +1075 -945
  4. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/odoo_devops_tools.egg-info/PKG-INFO +104 -150
  5. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/odoo_devops_tools.egg-info/SOURCES.txt +1 -1
  6. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/pyproject.toml +3 -3
  7. odoo_devops_tools-1.27.3/tests/test_refactoring.py +202 -0
  8. odoo_devops_tools-1.27.0/odoo_devops_tools.egg-info/requires.txt +0 -3
  9. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/LICENSE +0 -0
  10. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/odoo_devops_tools/__init__.py +0 -0
  11. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/odoo_devops_tools.egg-info/dependency_links.txt +0 -0
  12. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/odoo_devops_tools.egg-info/entry_points.txt +0 -0
  13. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/odoo_devops_tools.egg-info/top_level.txt +0 -0
  14. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/setup.cfg +0 -0
  15. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/tests/__init__.py +0 -0
  16. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/tests/common.py +0 -0
  17. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/tests/conftest.py +0 -0
  18. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/tests/integration_support.py +0 -0
  19. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/tests/test_bundle.py +0 -0
  20. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/tests/test_cli.py +0 -0
  21. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/tests/test_completion.py +0 -0
  22. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/tests/test_docker.py +0 -0
  23. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/tests/test_docker_source.py +0 -0
  24. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/tests/test_git.py +0 -0
  25. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/tests/test_git_progress.py +0 -0
  26. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/tests/test_ini.py +0 -0
  27. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/tests/test_lifecycle.py +0 -0
  28. {odoo_devops_tools-1.27.0 → odoo_devops_tools-1.27.3}/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.0
3
+ Version: 1.27.3
4
4
  Summary: Build reproducible Odoo workspaces from a single project definition.
5
5
  Author: Roman Lacko
6
6
  License-Expression: MIT
@@ -24,8 +24,6 @@ Classifier: Topic :: Software Development
24
24
  Requires-Python: >=3.9
25
25
  Description-Content-Type: text/markdown
26
26
  License-File: LICENSE
27
- Provides-Extra: test
28
- Requires-Dist: pytest<10,>=8; extra == "test"
29
27
  Dynamic: license-file
30
28
 
31
29
  # odoo-compose
@@ -667,9 +665,11 @@ Container orchestration remains with Docker Compose, and its CLI can still be us
667
665
 
668
666
  ## Commands
669
667
 
670
- `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.
671
669
 
672
- 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.
673
673
 
674
674
  ### Overview
675
675
 
@@ -728,38 +728,25 @@ Running `odoo-compose` without arguments displays help. Workspace commands requi
728
728
 
729
729
  ### `setup`
730
730
 
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. 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.
732
732
 
733
733
  **Usage**
734
734
 
735
735
  ```text
736
- {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]
737
738
  ```
738
739
 
739
740
  **Arguments**
740
741
 
741
742
  <dl class="cli-reference">
742
743
  <dt><code>ROOT|INI</code></dt>
743
- <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>
744
747
 
745
748
  </dl>
746
749
 
747
- Alternatively, load the workspace definition from a local INI file, Git repository, or URL:
748
-
749
- ```bash
750
- # Docker workflow:
751
- odoo-compose docker setup /path/to/odoo-project.ini
752
- odoo-compose docker setup 'git+git@github.com:company/repo.git//examples/odoo-project.ini?ref=main'
753
- odoo-compose docker setup 'https://github.com/lck/odoo-devops-tools/blob/main/examples/odoo-project.ini'
754
-
755
- # Native workflow:
756
- odoo-compose venv setup /path/to/odoo-project.ini
757
- odoo-compose venv setup 'git+git@github.com:company/repo.git//examples/odoo-project.ini?ref=main'
758
- odoo-compose venv setup 'https://github.com/lck/odoo-devops-tools/blob/main/examples/odoo-project.ini'
759
- ```
760
-
761
- Git source syntax: `git+REPO_URL//PATH/TO/PROJECT.ini?ref=REF`.
762
-
763
750
  **Options**
764
751
 
765
752
  **Paths and configuration**
@@ -807,15 +794,15 @@ Git source syntax: `git+REPO_URL//PATH/TO/PROJECT.ini?ref=REF`.
807
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>
808
795
 
809
796
  > **Note:**
810
- > 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.
811
798
 
812
799
  </dl>
813
800
 
814
- **Virtualenv and bundles** (`odoo-compose venv` only where indicated)
801
+ **Virtualenv and bundles**
815
802
 
816
803
  <dl class="cli-reference">
817
804
  <dt><code>--create-venv</code></dt>
818
- <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>
819
806
 
820
807
  <dt><code>--create-venv-from-wheelhouse</code></dt>
821
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>
@@ -824,13 +811,13 @@ Git source syntax: `git+REPO_URL//PATH/TO/PROJECT.ini?ref=REF`.
824
811
  <dd><p>Remove all items from pip's wheel cache.</p></dd>
825
812
 
826
813
  <dt><code>--create-bundle</code> <i>[BUNDLE]</i></dt>
827
- <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>
828
815
 
829
816
  <dt><code>--allow-dirty-bundle</code></dt>
830
817
  <dd><p>Allow bundle creation from repositories with uncommitted changes; otherwise dirty repositories abort the operation.</p></dd>
831
818
 
832
819
  <dt><code>--create-from-bundle</code> <i>BUNDLE</i></dt>
833
- <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>
834
821
 
835
822
  </dl>
836
823
 
@@ -838,7 +825,7 @@ Git source syntax: `git+REPO_URL//PATH/TO/PROJECT.ini?ref=REF`.
838
825
 
839
826
  <dl class="cli-reference">
840
827
  <dt><code>--create-docker-deploy</code></dt>
841
- <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>
842
829
 
843
830
  </dl>
844
831
 
@@ -848,21 +835,28 @@ Git source syntax: `git+REPO_URL//PATH/TO/PROJECT.ini?ref=REF`.
848
835
  # Docker workflow:
849
836
  odoo-compose docker setup ./odoo19
850
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'
851
839
 
852
840
  # Native workflow:
853
841
  odoo-compose venv setup ./odoo19 --sync --create-venv
854
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'
855
844
  ```
856
845
 
857
846
  ### `up`
858
847
 
859
- 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.
860
854
 
861
855
  **Usage**
862
856
 
863
857
  ```text
864
- {odoo-compose|odoo-compose venv} up [--root ROOT]
865
858
  odoo-compose docker up [--root ROOT] [--build] [--recreate]
859
+ odoo-compose venv up [--root ROOT]
866
860
  ```
867
861
 
868
862
  **Options**
@@ -878,20 +872,18 @@ odoo-compose docker up [--root ROOT] [--build] [--recreate]
878
872
  <dd><p>Force recreation of the Odoo container, without forcing recreation of the database container (Docker only).</p></dd>
879
873
  </dl>
880
874
 
881
- **Notes**
882
-
883
- Docker `up` remembers the last applied generated Odoo configuration and recreates the Odoo container when it changes, including after a separate `setup`.
884
- Running `up` without `--build` does not guarantee that changed Python dependencies or Dockerfile instructions are built into the image.
885
- 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.
886
-
887
875
  ### `down`
888
876
 
889
- 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`.
890
881
 
891
882
  **Usage**
892
883
 
893
884
  ```text
894
- {odoo-compose|odoo-compose venv} down [--root ROOT]
885
+ odoo-compose docker down [--root ROOT]
886
+ odoo-compose venv down [--root ROOT]
895
887
  ```
896
888
 
897
889
  **Options**
@@ -901,18 +893,18 @@ Stop the selected workspace, preserving data. Docker delegates to `docker compos
901
893
  <dd><p>Select an existing workspace (default: current directory).</p></dd>
902
894
  </dl>
903
895
 
904
- **Notes**
905
-
906
- 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.
907
-
908
896
  ### `status`
909
897
 
910
- 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.
911
902
 
912
903
  **Usage**
913
904
 
914
905
  ```text
915
- {odoo-compose|odoo-compose venv} status [--root ROOT]
906
+ odoo-compose docker status [--root ROOT]
907
+ odoo-compose venv status [--root ROOT]
916
908
  ```
917
909
 
918
910
  **Options**
@@ -922,18 +914,18 @@ Show runtime status without provisioning or changing the workspace. Docker displ
922
914
  <dd><p>Select an existing workspace (default: current directory).</p></dd>
923
915
  </dl>
924
916
 
925
- **Notes**
926
-
927
- 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.
928
-
929
917
  ### `run`
930
918
 
931
- 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`.
932
923
 
933
924
  **Usage**
934
925
 
935
926
  ```text
936
- {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...]
937
929
  ```
938
930
 
939
931
  **Arguments**
@@ -964,12 +956,16 @@ odoo-compose venv run -i base --stop-after-init
964
956
 
965
957
  ### `shell`
966
958
 
967
- 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.
968
963
 
969
964
  **Usage**
970
965
 
971
966
  ```text
972
- {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...]
973
969
  ```
974
970
 
975
971
  **Arguments**
@@ -988,16 +984,6 @@ Open an interactive Odoo shell. Like `run`, this uses a one-off container for Do
988
984
 
989
985
  </dl>
990
986
 
991
- **Examples**
992
-
993
- ```bash
994
- # Docker workflow:
995
- odoo-compose docker shell
996
-
997
- # Native workflow:
998
- odoo-compose venv shell
999
- ```
1000
-
1001
987
  ### `update`
1002
988
 
1003
989
  Update installed Odoo addons through `click-odoo-update`.
@@ -1005,7 +991,8 @@ Update installed Odoo addons through `click-odoo-update`.
1005
991
  **Usage**
1006
992
 
1007
993
  ```text
1008
- {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...]
1009
996
  ```
1010
997
 
1011
998
  **Arguments**
@@ -1027,16 +1014,6 @@ Update installed Odoo addons through `click-odoo-update`.
1027
1014
 
1028
1015
  </dl>
1029
1016
 
1030
- **Examples**
1031
-
1032
- ```bash
1033
- # Docker workflow:
1034
- odoo-compose docker update --all
1035
-
1036
- # Native workflow:
1037
- odoo-compose venv update --all
1038
- ```
1039
-
1040
1017
  ### `test`
1041
1018
 
1042
1019
  Run Odoo with `--test-enable --stop-after-init` in either workflow.
@@ -1044,7 +1021,8 @@ Run Odoo with `--test-enable --stop-after-init` in either workflow.
1044
1021
  **Usage**
1045
1022
 
1046
1023
  ```text
1047
- {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...]
1048
1026
  ```
1049
1027
 
1050
1028
  **Arguments**
@@ -1073,7 +1051,7 @@ odoo-compose docker test -i sale --test-tags /sale
1073
1051
  odoo-compose venv test -i sale --test-tags /sale
1074
1052
  ```
1075
1053
 
1076
- > **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`.
1077
1055
 
1078
1056
  ### `backup-db`
1079
1057
 
@@ -1082,7 +1060,8 @@ Create a PostgreSQL custom-format database dump.
1082
1060
  **Usage**
1083
1061
 
1084
1062
  ```text
1085
- {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]
1086
1065
  ```
1087
1066
 
1088
1067
  **Arguments**
@@ -1107,24 +1086,26 @@ Create a PostgreSQL custom-format database dump.
1107
1086
  # Docker workflow:
1108
1087
  odoo-compose docker backup-db
1109
1088
 
1110
- # Native only: select a specific version of the PostgreSQL client tools
1111
- export POSTGRES_BIN=/usr/lib/postgresql/16/bin
1089
+ # Docker with sudo:
1090
+ export ODOO_DOCKER_SUDO=1
1091
+ odoo-compose docker backup-db
1112
1092
 
1093
+ # Native workflow: select a specific version of the PostgreSQL client tools:
1094
+ export POSTGRES_BIN=/usr/lib/postgresql/16/bin
1113
1095
  odoo-compose venv backup-db
1114
1096
  ```
1115
1097
 
1116
- **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.
1117
-
1118
- For Docker, the database name defaults to `odoo` when not specified.
1119
-
1120
1098
  ### `restore-db`
1121
1099
 
1122
- 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`.
1123
1103
 
1124
1104
  **Usage**
1125
1105
 
1126
1106
  ```text
1127
- {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
1128
1109
  ```
1129
1110
 
1130
1111
  **Arguments**
@@ -1160,16 +1141,13 @@ odoo-compose docker restore-db ./odoo-backups/pre-upgrade.dump
1160
1141
  odoo-compose docker restore-db --force --copy ./odoo-backups/pre-upgrade.dump
1161
1142
  odoo-compose docker restore-db --move ./odoo-backups/pre-upgrade.dump
1162
1143
 
1163
- # Native only: optionally override PostgreSQL client location
1144
+ # Native workflow: select a specific version of the PostgreSQL client tools:
1164
1145
  export POSTGRES_BIN=/usr/lib/postgresql/16/bin
1165
-
1166
1146
  odoo-compose venv restore-db ./odoo-backups/pre-upgrade.dump
1167
1147
  odoo-compose venv restore-db --force --copy ./odoo-backups/pre-upgrade.dump
1168
1148
  odoo-compose venv restore-db --move ./odoo-backups/pre-upgrade.dump
1169
1149
  ```
1170
1150
 
1171
- An existing target database is never replaced without `--force`. For native connection and client configuration, see [`backup-db`](#backup-db).
1172
-
1173
1151
  ### `backup-filestore`
1174
1152
 
1175
1153
  Archive the selected database's filestore as a `.tar.gz` file.
@@ -1177,7 +1155,8 @@ Archive the selected database's filestore as a `.tar.gz` file.
1177
1155
  **Usage**
1178
1156
 
1179
1157
  ```text
1180
- {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]
1181
1160
  ```
1182
1161
 
1183
1162
  **Arguments**
@@ -1196,18 +1175,6 @@ Archive the selected database's filestore as a `.tar.gz` file.
1196
1175
 
1197
1176
  </dl>
1198
1177
 
1199
- **Examples**
1200
-
1201
- ```bash
1202
- # Docker workflow:
1203
- odoo-compose docker backup-filestore
1204
-
1205
- # Native workflow:
1206
- odoo-compose venv backup-filestore
1207
- ```
1208
-
1209
- 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.
1210
-
1211
1178
  ### `restore-filestore`
1212
1179
 
1213
1180
  Restore the selected database's filestore from a `.tar.gz` archive. Stop Odoo before restoring an active filestore.
@@ -1215,7 +1182,8 @@ Restore the selected database's filestore from a `.tar.gz` archive. Stop Odoo be
1215
1182
  **Usage**
1216
1183
 
1217
1184
  ```text
1218
- {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
1219
1187
  ```
1220
1188
 
1221
1189
  **Arguments**
@@ -1237,20 +1205,6 @@ Restore the selected database's filestore from a `.tar.gz` archive. Stop Odoo be
1237
1205
 
1238
1206
  </dl>
1239
1207
 
1240
- **Examples**
1241
-
1242
- ```bash
1243
- # Docker workflow:
1244
- odoo-compose docker restore-filestore ./odoo-backups/pre-upgrade-filestore.tar.gz
1245
- odoo-compose docker restore-filestore --force ./odoo-backups/pre-upgrade-filestore.tar.gz
1246
-
1247
- # Native workflow:
1248
- odoo-compose venv restore-filestore ./odoo-backups/pre-upgrade-filestore.tar.gz
1249
- odoo-compose venv restore-filestore --force ./odoo-backups/pre-upgrade-filestore.tar.gz
1250
- ```
1251
-
1252
- 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.
1253
-
1254
1208
  ### `restic`
1255
1209
 
1256
1210
  Run Restic against the configured repository. Restic supports incremental filestore snapshots and deduplication.
@@ -1258,7 +1212,8 @@ Run Restic against the configured repository. Restic supports incremental filest
1258
1212
  **Usage**
1259
1213
 
1260
1214
  ```text
1261
- {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...]
1262
1217
  ```
1263
1218
 
1264
1219
  **Arguments**
@@ -1291,24 +1246,24 @@ odoo-compose docker restic init
1291
1246
  odoo-compose docker restic snapshots
1292
1247
  odoo-compose docker restic check
1293
1248
 
1294
- # Native only: select a Restic executable instead of using PATH
1249
+ # Native workflow: select a specific version of the Restic executable
1295
1250
  export RESTIC_BIN=/opt/restic/restic
1296
-
1297
1251
  odoo-compose venv restic init
1298
1252
  odoo-compose venv restic snapshots
1299
1253
  odoo-compose venv restic check
1300
1254
  ```
1301
1255
 
1302
- **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`.
1303
-
1304
1256
  ### `backup-filestore-restic`
1305
1257
 
1306
1258
  Back up the selected database's filestore as a Restic snapshot.
1307
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
+
1308
1262
  **Usage**
1309
1263
 
1310
1264
  ```text
1311
- {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...]
1312
1267
  ```
1313
1268
 
1314
1269
  **Arguments**
@@ -1333,14 +1288,11 @@ Back up the selected database's filestore as a Restic snapshot.
1333
1288
  # Docker workflow:
1334
1289
  odoo-compose docker backup-filestore-restic
1335
1290
 
1336
- # Native only: optional Restic executable override
1291
+ # Native workflow: select a specific version of the Restic executable
1337
1292
  export RESTIC_BIN=/opt/restic/restic
1338
-
1339
1293
  odoo-compose venv backup-filestore-restic
1340
1294
  ```
1341
1295
 
1342
- 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.
1343
-
1344
1296
  ### `restore-filestore-restic`
1345
1297
 
1346
1298
  Restore the selected database's filestore from a Restic snapshot. Stop Odoo before restoring an active filestore.
@@ -1348,7 +1300,8 @@ Restore the selected database's filestore from a Restic snapshot. Stop Odoo befo
1348
1300
  **Usage**
1349
1301
 
1350
1302
  ```text
1351
- {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]
1352
1305
  ```
1353
1306
 
1354
1307
  **Arguments**
@@ -1380,16 +1333,21 @@ odoo-compose docker restore-filestore-restic --force latest
1380
1333
  odoo-compose venv restore-filestore-restic --force latest
1381
1334
  ```
1382
1335
 
1383
- 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.
1384
1337
 
1385
1338
  ### `neutralize`
1386
1339
 
1387
- 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.
1388
1345
 
1389
1346
  **Usage**
1390
1347
 
1391
1348
  ```text
1392
- {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]]
1393
1351
  ```
1394
1352
 
1395
1353
  **Options**
@@ -1417,11 +1375,9 @@ odoo-compose venv neutralize --dry-run
1417
1375
  odoo-compose venv neutralize --dry-run ./preview-sql
1418
1376
  ```
1419
1377
 
1420
- **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.
1378
+ #### Workspace neutralization scripts
1421
1379
 
1422
- #### Workspace SQL and INI interpolation
1423
-
1424
- 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:
1425
1381
 
1426
1382
  ```text
1427
1383
  neutralize/
@@ -1430,7 +1386,10 @@ neutralize/
1430
1386
  └── 03-set-ir-config-params.sql
1431
1387
  ```
1432
1388
 
1433
- 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.
1434
1393
 
1435
1394
  `odoo-project.ini`:
1436
1395
 
@@ -1447,13 +1406,7 @@ VALUES ('web.base.url', ${vars:base_url})
1447
1406
  ON CONFLICT (key) DO UPDATE SET value = EXCLUDED.value;
1448
1407
  ```
1449
1408
 
1450
- 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.
1451
-
1452
- #### SQL preview (`--dry-run`)
1453
-
1454
- 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.
1455
-
1456
- > **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.
1457
1410
 
1458
1411
  #### Restore, update and neutralize
1459
1412
 
@@ -1484,7 +1437,8 @@ Generate shell-completion definitions for either CLI. See [Shell completion](#sh
1484
1437
  **Usage**
1485
1438
 
1486
1439
  ```text
1487
- {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}
1488
1442
  ```
1489
1443
 
1490
1444
  **Arguments**
@@ -1734,13 +1688,13 @@ http_port = 8069
1734
1688
 
1735
1689
  From the repository root:
1736
1690
 
1737
- Install the test dependency with `python -m pip install -e ".[test]"`, then run:
1691
+ With [uv](https://docs.astral.sh/uv/) installed, run:
1738
1692
 
1739
1693
  ```bash
1740
- pytest # All available tests
1741
- pytest -m "not integration" # Fast tests only
1742
- pytest -m integration # Integration tests only
1743
- pytest tests/test_git.py # Specific test file
1694
+ uv run pytest # All available tests
1695
+ uv run pytest -m "not integration" # Fast tests only
1696
+ uv run pytest -m integration # Integration tests only
1697
+ uv run pytest tests/test_git.py # Specific test file
1744
1698
  ```
1745
1699
 
1746
1700
  Integration tests use Docker to prepare Odoo and PostgreSQL automatically.