odoo-devops-tools 1.27.1__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.
- {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.3}/PKG-INFO +99 -143
- {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.3}/README.md +98 -142
- {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.3}/odoo_devops_tools/odoo_compose.py +1075 -945
- {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.3}/odoo_devops_tools.egg-info/PKG-INFO +99 -143
- {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.3}/odoo_devops_tools.egg-info/SOURCES.txt +1 -0
- {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.3}/pyproject.toml +1 -1
- odoo_devops_tools-1.27.3/tests/test_refactoring.py +202 -0
- {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.3}/LICENSE +0 -0
- {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.3}/odoo_devops_tools/__init__.py +0 -0
- {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.3}/odoo_devops_tools.egg-info/dependency_links.txt +0 -0
- {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.3}/odoo_devops_tools.egg-info/entry_points.txt +0 -0
- {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.3}/odoo_devops_tools.egg-info/top_level.txt +0 -0
- {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.3}/setup.cfg +0 -0
- {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.3}/tests/__init__.py +0 -0
- {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.3}/tests/common.py +0 -0
- {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.3}/tests/conftest.py +0 -0
- {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.3}/tests/integration_support.py +0 -0
- {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.3}/tests/test_bundle.py +0 -0
- {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.3}/tests/test_cli.py +0 -0
- {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.3}/tests/test_completion.py +0 -0
- {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.3}/tests/test_docker.py +0 -0
- {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.3}/tests/test_docker_source.py +0 -0
- {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.3}/tests/test_git.py +0 -0
- {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.3}/tests/test_git_progress.py +0 -0
- {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.3}/tests/test_ini.py +0 -0
- {odoo_devops_tools-1.27.1 → odoo_devops_tools-1.27.3}/tests/test_lifecycle.py +0 -0
- {odoo_devops_tools-1.27.1 → 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.
|
|
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
|
|
@@ -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.
|
|
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.
|
|
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.
|
|
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
|
-
|
|
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.
|
|
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.
|
|
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**
|
|
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
|
|
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
|
|
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
|
|
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
|
|
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`.
|
|
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.
|
|
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
|
-
|
|
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.
|
|
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
|
-
|
|
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.
|
|
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
|
-
|
|
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.
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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:**
|
|
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
|
-
|
|
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
|
-
#
|
|
1109
|
-
export
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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.
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
1378
|
+
#### Workspace neutralization scripts
|
|
1419
1379
|
|
|
1420
|
-
|
|
1421
|
-
|
|
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.
|
|
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.
|
|
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
|
-
|
|
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**
|