odoo-devops-tools 1.25.4__tar.gz → 1.26.0__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.25.4 → odoo_devops_tools-1.26.0}/PKG-INFO +103 -85
- {odoo_devops_tools-1.25.4 → odoo_devops_tools-1.26.0}/README.md +102 -84
- odoo_devops_tools-1.26.0/odoo_devops_tools/__init__.py +0 -0
- odoo_devops_tools-1.25.4/odoo_devops_tools/env.py → odoo_devops_tools-1.26.0/odoo_devops_tools/odoo_compose.py +156 -23
- {odoo_devops_tools-1.25.4 → odoo_devops_tools-1.26.0}/odoo_devops_tools.egg-info/PKG-INFO +103 -85
- {odoo_devops_tools-1.25.4 → odoo_devops_tools-1.26.0}/odoo_devops_tools.egg-info/SOURCES.txt +1 -1
- odoo_devops_tools-1.26.0/odoo_devops_tools.egg-info/entry_points.txt +3 -0
- {odoo_devops_tools-1.25.4 → odoo_devops_tools-1.26.0}/pyproject.toml +3 -3
- odoo_devops_tools-1.25.4/odoo_devops_tools/__init__.py +0 -1
- odoo_devops_tools-1.25.4/odoo_devops_tools.egg-info/entry_points.txt +0 -3
- {odoo_devops_tools-1.25.4 → odoo_devops_tools-1.26.0}/LICENSE +0 -0
- {odoo_devops_tools-1.25.4 → odoo_devops_tools-1.26.0}/odoo_devops_tools.egg-info/dependency_links.txt +0 -0
- {odoo_devops_tools-1.25.4 → odoo_devops_tools-1.26.0}/odoo_devops_tools.egg-info/top_level.txt +0 -0
- {odoo_devops_tools-1.25.4 → odoo_devops_tools-1.26.0}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: odoo-devops-tools
|
|
3
|
-
Version: 1.
|
|
3
|
+
Version: 1.26.0
|
|
4
4
|
Summary: Build reproducible Odoo workspaces from a single project definition.
|
|
5
5
|
Author: Roman Lacko
|
|
6
6
|
License-Expression: MIT
|
|
@@ -52,13 +52,8 @@ From this configuration, `odoo-compose` can generate a workspace such as:
|
|
|
52
52
|
```text
|
|
53
53
|
ROOT/
|
|
54
54
|
├── docker/ # generated Docker artifacts
|
|
55
|
-
│ ├── local/ # Docker workflow artifacts
|
|
56
|
-
│ │ └── configs/ # generated local Odoo config
|
|
57
|
-
│ └── deploy/ # self-contained deploy build context
|
|
58
55
|
├── odoo/ # Odoo source
|
|
59
56
|
├── odoo-addons/ # addon sources
|
|
60
|
-
│ ├── oca-web/
|
|
61
|
-
│ └── oca-helpdesk/
|
|
62
57
|
├── odoo-configs/ # generated Odoo configuration
|
|
63
58
|
├── odoo-data/ # Odoo data directory
|
|
64
59
|
├── odoo-logs/ # runtime logs
|
|
@@ -76,8 +71,7 @@ ROOT/
|
|
|
76
71
|
* **Portable workflows** — create verified bundles with sources and Python wheels for reproducible or offline use.
|
|
77
72
|
* **Python dependency management** — manage Python versions, virtual environments and requirements.
|
|
78
73
|
* **Composable configuration** — combine INI layers, variables, and CLI overrides.
|
|
79
|
-
|
|
80
|
-
`odoo-compose` focuses on creating and maintaining the Odoo workspace and its derived artifacts. Infrastructure provisioning and deployment orchestration remain outside its scope.
|
|
74
|
+
* **Standalone, dependency-free Python script** — run `odoo_compose.py` with the Python standard library alone, or embed the single file in another project.
|
|
81
75
|
|
|
82
76
|
---
|
|
83
77
|
|
|
@@ -105,7 +99,7 @@ odoo-compose --help
|
|
|
105
99
|
|
|
106
100
|
### Shell autocompletion
|
|
107
101
|
|
|
108
|
-
|
|
102
|
+
`odoo-compose` supports `TAB` completion for Docker and native `venv` subcommands,
|
|
109
103
|
options, and filesystem paths. No additional Python dependencies are required.
|
|
110
104
|
|
|
111
105
|
To enable shell autocompletion, run the commands for your shell:
|
|
@@ -114,14 +108,12 @@ To enable shell autocompletion, run the commands for your shell:
|
|
|
114
108
|
|
|
115
109
|
```bash
|
|
116
110
|
echo 'eval "$(odoo-compose completion bash)"' >> ~/.bashrc
|
|
117
|
-
echo 'eval "$(odoo-compose-venv completion bash)"' >> ~/.bashrc
|
|
118
111
|
```
|
|
119
112
|
|
|
120
113
|
**Zsh**
|
|
121
114
|
|
|
122
115
|
```zsh
|
|
123
116
|
echo 'eval "$(odoo-compose completion zsh)"' >> ~/.zshrc
|
|
124
|
-
echo 'eval "$(odoo-compose-venv completion zsh)"' >> ~/.zshrc
|
|
125
117
|
```
|
|
126
118
|
|
|
127
119
|
Zsh's completion system (`compinit`) must be enabled before these lines run.
|
|
@@ -131,7 +123,6 @@ Zsh's completion system (`compinit`) must be enabled before these lines run.
|
|
|
131
123
|
```fish
|
|
132
124
|
mkdir -p ~/.config/fish/completions
|
|
133
125
|
odoo-compose completion fish > ~/.config/fish/completions/odoo-compose.fish
|
|
134
|
-
odoo-compose-venv completion fish > ~/.config/fish/completions/odoo-compose-venv.fish
|
|
135
126
|
```
|
|
136
127
|
|
|
137
128
|
**PowerShell**
|
|
@@ -141,7 +132,6 @@ if (!(Test-Path -Path $PROFILE)) {
|
|
|
141
132
|
New-Item -ItemType File -Path $PROFILE -Force | Out-Null
|
|
142
133
|
}
|
|
143
134
|
Add-Content -Path $PROFILE -Value 'odoo-compose completion powershell | Out-String | Invoke-Expression'
|
|
144
|
-
Add-Content -Path $PROFILE -Value 'odoo-compose-venv completion powershell | Out-String | Invoke-Expression'
|
|
145
135
|
```
|
|
146
136
|
|
|
147
137
|
Restart your shell or reload its configuration to activate completion. For example,
|
|
@@ -152,10 +142,10 @@ Restart your shell or reload its configuration to activate completion. For examp
|
|
|
152
142
|
|
|
153
143
|
## Usage
|
|
154
144
|
|
|
155
|
-
`odoo-devops-tools` supports two development workflows
|
|
145
|
+
`odoo-devops-tools` supports two development workflows:
|
|
156
146
|
|
|
157
147
|
- **Docker workflow (`odoo-compose`)** — run Odoo and PostgreSQL with the generated Docker Compose environment.
|
|
158
|
-
- **Native development with venv (`odoo-compose
|
|
148
|
+
- **Native development with venv (`odoo-compose venv`)** — run Odoo directly on the host using a generated Python virtual environment.
|
|
159
149
|
|
|
160
150
|
Choose the workflow that fits your environment. Both use the same `odoo-project.ini` project definition.
|
|
161
151
|
|
|
@@ -364,7 +354,7 @@ In this workflow, Odoo runs directly on the host using a generated Python virtua
|
|
|
364
354
|
Create the workspace with the Odoo source and virtual environment:
|
|
365
355
|
|
|
366
356
|
```bash
|
|
367
|
-
odoo-compose
|
|
357
|
+
odoo-compose venv setup ./odoo19 --sync --create-venv \
|
|
368
358
|
--set config:db_host=127.0.0.1 \
|
|
369
359
|
--set config:db_name=odoo \
|
|
370
360
|
--set config:db_user=odoo \
|
|
@@ -391,17 +381,17 @@ Then start Odoo in the background:
|
|
|
391
381
|
|
|
392
382
|
```bash
|
|
393
383
|
cd ./odoo19
|
|
394
|
-
odoo-compose
|
|
395
|
-
odoo-compose
|
|
384
|
+
odoo-compose venv up
|
|
385
|
+
odoo-compose venv status
|
|
396
386
|
```
|
|
397
387
|
|
|
398
388
|
Odoo starts with the generated configuration from `./odoo-configs/odoo-server.conf` and is available at http://localhost:8069.
|
|
399
389
|
|
|
400
|
-
Use `odoo-compose
|
|
390
|
+
Use `odoo-compose venv run` instead to run in the foreground:
|
|
401
391
|
|
|
402
392
|
```bash
|
|
403
393
|
cd ./odoo19
|
|
404
|
-
odoo-compose
|
|
394
|
+
odoo-compose venv run
|
|
405
395
|
```
|
|
406
396
|
|
|
407
397
|
### 2.1. Adding extra addons
|
|
@@ -423,7 +413,7 @@ branch = ${odoo:version}
|
|
|
423
413
|
Sync the addon repositories and recreate the Python environment to include their dependencies:
|
|
424
414
|
|
|
425
415
|
```bash
|
|
426
|
-
odoo-compose
|
|
416
|
+
odoo-compose venv setup --sync --create-venv
|
|
427
417
|
```
|
|
428
418
|
|
|
429
419
|
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.
|
|
@@ -431,13 +421,13 @@ The repositories are cloned into `ROOT/odoo-addons/` and automatically added to
|
|
|
431
421
|
Install the new modules:
|
|
432
422
|
|
|
433
423
|
```bash
|
|
434
|
-
odoo-compose
|
|
424
|
+
odoo-compose venv run -i web_notify,helpdesk_mgmt
|
|
435
425
|
```
|
|
436
426
|
|
|
437
427
|
For subsequent addon updates, use:
|
|
438
428
|
|
|
439
429
|
```bash
|
|
440
|
-
odoo-compose
|
|
430
|
+
odoo-compose venv update
|
|
441
431
|
```
|
|
442
432
|
|
|
443
433
|
The `update` command uses `click-odoo-update` with the workspace Odoo configuration.
|
|
@@ -467,7 +457,7 @@ python_version = 3.11
|
|
|
467
457
|
After changing the project file, run `odoo-compose` again from the workspace root:
|
|
468
458
|
|
|
469
459
|
```bash
|
|
470
|
-
odoo-compose
|
|
460
|
+
odoo-compose venv setup --sync --create-venv
|
|
471
461
|
```
|
|
472
462
|
|
|
473
463
|
This recreates the virtual environment at `ROOT/venv` using the system Python.
|
|
@@ -557,7 +547,7 @@ Those machine-specific outputs are recreated on the target machine.
|
|
|
557
547
|
On an internet-connected build machine, sync the sources, build the wheelhouse, and create the bundle in one command:
|
|
558
548
|
|
|
559
549
|
```bash
|
|
560
|
-
odoo-compose
|
|
550
|
+
odoo-compose venv setup --sync --create-venv --create-bundle
|
|
561
551
|
```
|
|
562
552
|
|
|
563
553
|
When no output path is supplied, the bundle is written to:
|
|
@@ -569,7 +559,7 @@ ROOT/dist/ROOT-NAME.odt.zip
|
|
|
569
559
|
You can also select an explicit output file:
|
|
570
560
|
|
|
571
561
|
```bash
|
|
572
|
-
odoo-compose
|
|
562
|
+
odoo-compose venv setup --sync --create-venv --create-bundle ./artifacts/odoo18-production.odt.zip
|
|
573
563
|
```
|
|
574
564
|
|
|
575
565
|
#### 4.1.1. Including uncommitted changes
|
|
@@ -579,7 +569,7 @@ By default, bundle creation stops when a bundled Git repository has uncommitted
|
|
|
579
569
|
To intentionally include those changes in the bundle, use:
|
|
580
570
|
|
|
581
571
|
```bash
|
|
582
|
-
odoo-compose
|
|
572
|
+
odoo-compose venv setup --sync --create-venv --create-bundle --allow-dirty-bundle
|
|
583
573
|
```
|
|
584
574
|
|
|
585
575
|
### 4.2. Create the workspace on the target machine
|
|
@@ -587,7 +577,7 @@ odoo-compose-venv setup --sync --create-venv --create-bundle --allow-dirty-bundl
|
|
|
587
577
|
Copy the ZIP to the target machine and import it into an empty directory:
|
|
588
578
|
|
|
589
579
|
```bash
|
|
590
|
-
odoo-compose
|
|
580
|
+
odoo-compose venv setup --create-from-bundle ./odoo18-production.odt.zip \
|
|
591
581
|
--root ./odoo18-prod \
|
|
592
582
|
--set config:db_host=127.0.0.1 \
|
|
593
583
|
--set config:db_name=odoo \
|
|
@@ -614,13 +604,41 @@ The import operation:
|
|
|
614
604
|
The existing manual workflow remains available. After preparing a complete workspace on the build machine, copy the whole workspace and run this command from the copied root:
|
|
615
605
|
|
|
616
606
|
```bash
|
|
617
|
-
odoo-compose
|
|
607
|
+
odoo-compose venv setup --create-venv-from-wheelhouse
|
|
618
608
|
```
|
|
619
609
|
|
|
620
610
|
This recreates `ROOT/venv`, skips dependency compilation and wheelhouse building, and installs strictly from the existing `ROOT/wheelhouse/` and `all-requirements.lock.txt`.
|
|
621
611
|
|
|
622
612
|
---
|
|
623
613
|
|
|
614
|
+
## Standalone and embedded usage
|
|
615
|
+
|
|
616
|
+
The core CLI is intentionally implemented in a **single Python file**, `odoo_devops_tools/odoo_compose.py`, using **only the Python standard library**. You can copy that file into another project and run it directly, without installing the `odoo-devops-tools` Python package or any third-party Python libraries.
|
|
617
|
+
|
|
618
|
+
For example, copy `odoo_compose.py` into your project alongside `odoo-project.ini`:
|
|
619
|
+
|
|
620
|
+
```text
|
|
621
|
+
my-project/
|
|
622
|
+
├── odoo_compose.py
|
|
623
|
+
└── odoo-project.ini
|
|
624
|
+
```
|
|
625
|
+
|
|
626
|
+
Then run the Docker workflow from the project directory:
|
|
627
|
+
|
|
628
|
+
```bash
|
|
629
|
+
python odoo_compose.py setup --sync
|
|
630
|
+
python odoo_compose.py up --build
|
|
631
|
+
```
|
|
632
|
+
|
|
633
|
+
For the native venv workflow, add `venv` before the command:
|
|
634
|
+
|
|
635
|
+
```bash
|
|
636
|
+
python odoo_compose.py venv setup --sync --create-venv
|
|
637
|
+
python odoo_compose.py venv run
|
|
638
|
+
```
|
|
639
|
+
|
|
640
|
+
---
|
|
641
|
+
|
|
624
642
|
## Runtime lifecycle
|
|
625
643
|
|
|
626
644
|
Use the same lifecycle commands with either CLI after provisioning the workspace with `setup`:
|
|
@@ -632,9 +650,9 @@ odoo-compose status
|
|
|
632
650
|
odoo-compose down
|
|
633
651
|
|
|
634
652
|
# Native: generate config and start Odoo in the background
|
|
635
|
-
odoo-compose
|
|
636
|
-
odoo-compose
|
|
637
|
-
odoo-compose
|
|
653
|
+
odoo-compose venv up
|
|
654
|
+
odoo-compose venv status
|
|
655
|
+
odoo-compose venv down
|
|
638
656
|
```
|
|
639
657
|
|
|
640
658
|
`odoo-compose up` regenerates local workspace artifacts and then runs the equivalent of `docker compose up -d --wait`.
|
|
@@ -649,9 +667,9 @@ Container orchestration remains with Docker Compose, and its CLI can still be us
|
|
|
649
667
|
|
|
650
668
|
## Commands
|
|
651
669
|
|
|
652
|
-
`odoo-compose` operates on Docker workspaces; `odoo-compose
|
|
670
|
+
`odoo-compose` 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.
|
|
653
671
|
|
|
654
|
-
Running either CLI without a command displays help; workspace changes are performed through `setup`. Use `odoo-compose <command> --help` or `odoo-compose
|
|
672
|
+
Running either CLI without a command displays help; workspace changes are performed through `setup`. Use `odoo-compose <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.
|
|
655
673
|
|
|
656
674
|
### Overview
|
|
657
675
|
|
|
@@ -715,7 +733,7 @@ Create or update an Odoo workspace. When no project file exists, `setup` creates
|
|
|
715
733
|
**Usage**
|
|
716
734
|
|
|
717
735
|
```text
|
|
718
|
-
{odoo-compose|odoo-compose
|
|
736
|
+
{odoo-compose|odoo-compose venv} setup [ROOT|INI] [OPTIONS]
|
|
719
737
|
```
|
|
720
738
|
|
|
721
739
|
**Arguments**
|
|
@@ -735,9 +753,9 @@ odoo-compose setup 'git+git@github.com:company/repo.git//examples/odoo-project.i
|
|
|
735
753
|
odoo-compose setup 'https://github.com/lck/odoo-devops-tools/blob/main/examples/odoo-project.ini'
|
|
736
754
|
|
|
737
755
|
# Native workflow:
|
|
738
|
-
odoo-compose
|
|
739
|
-
odoo-compose
|
|
740
|
-
odoo-compose
|
|
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'
|
|
741
759
|
```
|
|
742
760
|
|
|
743
761
|
Git source syntax: `git+REPO_URL//PATH/TO/PROJECT.ini?ref=REF`.
|
|
@@ -793,7 +811,7 @@ Git source syntax: `git+REPO_URL//PATH/TO/PROJECT.ini?ref=REF`.
|
|
|
793
811
|
|
|
794
812
|
</dl>
|
|
795
813
|
|
|
796
|
-
**Virtualenv and bundles** (`odoo-compose
|
|
814
|
+
**Virtualenv and bundles** (`odoo-compose venv` only where indicated)
|
|
797
815
|
|
|
798
816
|
<dl class="cli-reference">
|
|
799
817
|
<dt><code>--create-venv</code></dt>
|
|
@@ -832,8 +850,8 @@ odoo-compose setup ./odoo19
|
|
|
832
850
|
odoo-compose setup ./odoo18 --set odoo:version=18.0
|
|
833
851
|
|
|
834
852
|
# Native workflow:
|
|
835
|
-
odoo-compose
|
|
836
|
-
odoo-compose
|
|
853
|
+
odoo-compose venv setup ./odoo19 --sync --create-venv
|
|
854
|
+
odoo-compose venv setup ./odoo18 --set odoo:version=18.0 --sync-all --create-venv
|
|
837
855
|
```
|
|
838
856
|
|
|
839
857
|
### `up`
|
|
@@ -843,7 +861,7 @@ Prepare and start the selected workspace. Requires an existing `odoo-project.ini
|
|
|
843
861
|
**Usage**
|
|
844
862
|
|
|
845
863
|
```text
|
|
846
|
-
{odoo-compose|odoo-compose
|
|
864
|
+
{odoo-compose|odoo-compose venv} up [--root ROOT]
|
|
847
865
|
odoo-compose up [--root ROOT] [--build] [--recreate]
|
|
848
866
|
```
|
|
849
867
|
|
|
@@ -868,12 +886,12 @@ Native `up` uses `ROOT/.odt-env/odoo-process.json` for process identity and writ
|
|
|
868
886
|
|
|
869
887
|
### `down`
|
|
870
888
|
|
|
871
|
-
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
|
|
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`.
|
|
872
890
|
|
|
873
891
|
**Usage**
|
|
874
892
|
|
|
875
893
|
```text
|
|
876
|
-
{odoo-compose|odoo-compose
|
|
894
|
+
{odoo-compose|odoo-compose venv} down [--root ROOT]
|
|
877
895
|
```
|
|
878
896
|
|
|
879
897
|
**Options**
|
|
@@ -894,7 +912,7 @@ Show runtime status without provisioning or changing the workspace. Docker displ
|
|
|
894
912
|
**Usage**
|
|
895
913
|
|
|
896
914
|
```text
|
|
897
|
-
{odoo-compose|odoo-compose
|
|
915
|
+
{odoo-compose|odoo-compose venv} status [--root ROOT]
|
|
898
916
|
```
|
|
899
917
|
|
|
900
918
|
**Options**
|
|
@@ -915,7 +933,7 @@ Run Odoo directly from the selected workspace. Docker uses a one-off container;
|
|
|
915
933
|
**Usage**
|
|
916
934
|
|
|
917
935
|
```text
|
|
918
|
-
{odoo-compose|odoo-compose
|
|
936
|
+
{odoo-compose|odoo-compose venv} run [--root ROOT] [ODOO_ARGS...]
|
|
919
937
|
```
|
|
920
938
|
|
|
921
939
|
**Arguments**
|
|
@@ -941,7 +959,7 @@ Run Odoo directly from the selected workspace. Docker uses a one-off container;
|
|
|
941
959
|
odoo-compose run -i base --stop-after-init
|
|
942
960
|
|
|
943
961
|
# Native workflow:
|
|
944
|
-
odoo-compose
|
|
962
|
+
odoo-compose venv run -i base --stop-after-init
|
|
945
963
|
```
|
|
946
964
|
|
|
947
965
|
### `shell`
|
|
@@ -951,7 +969,7 @@ Open an interactive Odoo shell. Like `run`, this uses a one-off container for Do
|
|
|
951
969
|
**Usage**
|
|
952
970
|
|
|
953
971
|
```text
|
|
954
|
-
{odoo-compose|odoo-compose
|
|
972
|
+
{odoo-compose|odoo-compose venv} shell [--root ROOT] [ODOO_ARGS...]
|
|
955
973
|
```
|
|
956
974
|
|
|
957
975
|
**Arguments**
|
|
@@ -977,7 +995,7 @@ Open an interactive Odoo shell. Like `run`, this uses a one-off container for Do
|
|
|
977
995
|
odoo-compose shell
|
|
978
996
|
|
|
979
997
|
# Native workflow:
|
|
980
|
-
odoo-compose
|
|
998
|
+
odoo-compose venv shell
|
|
981
999
|
```
|
|
982
1000
|
|
|
983
1001
|
### `update`
|
|
@@ -987,7 +1005,7 @@ Update installed Odoo addons through `click-odoo-update`.
|
|
|
987
1005
|
**Usage**
|
|
988
1006
|
|
|
989
1007
|
```text
|
|
990
|
-
{odoo-compose|odoo-compose
|
|
1008
|
+
{odoo-compose|odoo-compose venv} update [--root ROOT] [--all] [ODOO_ARGS...]
|
|
991
1009
|
```
|
|
992
1010
|
|
|
993
1011
|
**Arguments**
|
|
@@ -1016,7 +1034,7 @@ Update installed Odoo addons through `click-odoo-update`.
|
|
|
1016
1034
|
odoo-compose update --all
|
|
1017
1035
|
|
|
1018
1036
|
# Native workflow:
|
|
1019
|
-
odoo-compose
|
|
1037
|
+
odoo-compose venv update --all
|
|
1020
1038
|
```
|
|
1021
1039
|
|
|
1022
1040
|
### `test`
|
|
@@ -1026,7 +1044,7 @@ Run Odoo with `--test-enable --stop-after-init` in either workflow.
|
|
|
1026
1044
|
**Usage**
|
|
1027
1045
|
|
|
1028
1046
|
```text
|
|
1029
|
-
{odoo-compose|odoo-compose
|
|
1047
|
+
{odoo-compose|odoo-compose venv} test [--root ROOT] [ODOO_ARGS...]
|
|
1030
1048
|
```
|
|
1031
1049
|
|
|
1032
1050
|
**Arguments**
|
|
@@ -1052,7 +1070,7 @@ Run Odoo with `--test-enable --stop-after-init` in either workflow.
|
|
|
1052
1070
|
odoo-compose test -i sale --test-tags /sale
|
|
1053
1071
|
|
|
1054
1072
|
# Native workflow:
|
|
1055
|
-
odoo-compose
|
|
1073
|
+
odoo-compose venv test -i sale --test-tags /sale
|
|
1056
1074
|
```
|
|
1057
1075
|
|
|
1058
1076
|
> **Docker note:** Docker commands use one-off containers. Set `ODOO_DOCKER_SUDO=1` on Linux if Docker requires `sudo`.
|
|
@@ -1064,7 +1082,7 @@ Create a PostgreSQL custom-format database dump.
|
|
|
1064
1082
|
**Usage**
|
|
1065
1083
|
|
|
1066
1084
|
```text
|
|
1067
|
-
{odoo-compose|odoo-compose
|
|
1085
|
+
{odoo-compose|odoo-compose venv} backup-db [--root ROOT] [OUTPUT]
|
|
1068
1086
|
```
|
|
1069
1087
|
|
|
1070
1088
|
**Arguments**
|
|
@@ -1092,10 +1110,10 @@ odoo-compose backup-db
|
|
|
1092
1110
|
# Native only: select a specific version of the PostgreSQL client tools
|
|
1093
1111
|
export POSTGRES_BIN=/usr/lib/postgresql/16/bin
|
|
1094
1112
|
|
|
1095
|
-
odoo-compose
|
|
1113
|
+
odoo-compose venv backup-db
|
|
1096
1114
|
```
|
|
1097
1115
|
|
|
1098
|
-
**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
|
|
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.
|
|
1099
1117
|
|
|
1100
1118
|
For Docker, the database name defaults to `odoo` when not specified.
|
|
1101
1119
|
|
|
@@ -1106,7 +1124,7 @@ Restore a PostgreSQL custom-format dump into `[config].db_name` (Docker defaults
|
|
|
1106
1124
|
**Usage**
|
|
1107
1125
|
|
|
1108
1126
|
```text
|
|
1109
|
-
{odoo-compose|odoo-compose
|
|
1127
|
+
{odoo-compose|odoo-compose venv} restore-db [--root ROOT] [--force] [--copy|--move] BACKUP.dump
|
|
1110
1128
|
```
|
|
1111
1129
|
|
|
1112
1130
|
**Arguments**
|
|
@@ -1145,9 +1163,9 @@ odoo-compose restore-db --move ./odoo-backups/pre-upgrade.dump
|
|
|
1145
1163
|
# Native only: optionally override PostgreSQL client location
|
|
1146
1164
|
export POSTGRES_BIN=/usr/lib/postgresql/16/bin
|
|
1147
1165
|
|
|
1148
|
-
odoo-compose
|
|
1149
|
-
odoo-compose
|
|
1150
|
-
odoo-compose
|
|
1166
|
+
odoo-compose venv restore-db ./odoo-backups/pre-upgrade.dump
|
|
1167
|
+
odoo-compose venv restore-db --force --copy ./odoo-backups/pre-upgrade.dump
|
|
1168
|
+
odoo-compose venv restore-db --move ./odoo-backups/pre-upgrade.dump
|
|
1151
1169
|
```
|
|
1152
1170
|
|
|
1153
1171
|
An existing target database is never replaced without `--force`. For native connection and client configuration, see [`backup-db`](#backup-db).
|
|
@@ -1159,7 +1177,7 @@ Archive the selected database's filestore as a `.tar.gz` file.
|
|
|
1159
1177
|
**Usage**
|
|
1160
1178
|
|
|
1161
1179
|
```text
|
|
1162
|
-
{odoo-compose|odoo-compose
|
|
1180
|
+
{odoo-compose|odoo-compose venv} backup-filestore [--root ROOT] [OUTPUT]
|
|
1163
1181
|
```
|
|
1164
1182
|
|
|
1165
1183
|
**Arguments**
|
|
@@ -1185,7 +1203,7 @@ Archive the selected database's filestore as a `.tar.gz` file.
|
|
|
1185
1203
|
odoo-compose backup-filestore
|
|
1186
1204
|
|
|
1187
1205
|
# Native workflow:
|
|
1188
|
-
odoo-compose
|
|
1206
|
+
odoo-compose venv backup-filestore
|
|
1189
1207
|
```
|
|
1190
1208
|
|
|
1191
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.
|
|
@@ -1197,7 +1215,7 @@ Restore the selected database's filestore from a `.tar.gz` archive. Stop Odoo be
|
|
|
1197
1215
|
**Usage**
|
|
1198
1216
|
|
|
1199
1217
|
```text
|
|
1200
|
-
{odoo-compose|odoo-compose
|
|
1218
|
+
{odoo-compose|odoo-compose venv} restore-filestore [--root ROOT] [--force] FILESTORE.tar.gz
|
|
1201
1219
|
```
|
|
1202
1220
|
|
|
1203
1221
|
**Arguments**
|
|
@@ -1227,8 +1245,8 @@ odoo-compose restore-filestore ./odoo-backups/pre-upgrade-filestore.tar.gz
|
|
|
1227
1245
|
odoo-compose restore-filestore --force ./odoo-backups/pre-upgrade-filestore.tar.gz
|
|
1228
1246
|
|
|
1229
1247
|
# Native workflow:
|
|
1230
|
-
odoo-compose
|
|
1231
|
-
odoo-compose
|
|
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
|
|
1232
1250
|
```
|
|
1233
1251
|
|
|
1234
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.
|
|
@@ -1240,7 +1258,7 @@ Run Restic against the configured repository. Restic supports incremental filest
|
|
|
1240
1258
|
**Usage**
|
|
1241
1259
|
|
|
1242
1260
|
```text
|
|
1243
|
-
{odoo-compose|odoo-compose
|
|
1261
|
+
{odoo-compose|odoo-compose venv} restic [--root ROOT] RESTIC_COMMAND [ARGS...]
|
|
1244
1262
|
```
|
|
1245
1263
|
|
|
1246
1264
|
**Arguments**
|
|
@@ -1276,12 +1294,12 @@ odoo-compose restic check
|
|
|
1276
1294
|
# Native only: select a Restic executable instead of using PATH
|
|
1277
1295
|
export RESTIC_BIN=/opt/restic/restic
|
|
1278
1296
|
|
|
1279
|
-
odoo-compose
|
|
1280
|
-
odoo-compose
|
|
1281
|
-
odoo-compose
|
|
1297
|
+
odoo-compose venv restic init
|
|
1298
|
+
odoo-compose venv restic snapshots
|
|
1299
|
+
odoo-compose venv restic check
|
|
1282
1300
|
```
|
|
1283
1301
|
|
|
1284
|
-
**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
|
|
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`.
|
|
1285
1303
|
|
|
1286
1304
|
### `backup-filestore-restic`
|
|
1287
1305
|
|
|
@@ -1290,7 +1308,7 @@ Back up the selected database's filestore as a Restic snapshot.
|
|
|
1290
1308
|
**Usage**
|
|
1291
1309
|
|
|
1292
1310
|
```text
|
|
1293
|
-
{odoo-compose|odoo-compose
|
|
1311
|
+
{odoo-compose|odoo-compose venv} backup-filestore-restic [--root ROOT] [RESTIC_ARGS...]
|
|
1294
1312
|
```
|
|
1295
1313
|
|
|
1296
1314
|
**Arguments**
|
|
@@ -1318,7 +1336,7 @@ odoo-compose backup-filestore-restic
|
|
|
1318
1336
|
# Native only: optional Restic executable override
|
|
1319
1337
|
export RESTIC_BIN=/opt/restic/restic
|
|
1320
1338
|
|
|
1321
|
-
odoo-compose
|
|
1339
|
+
odoo-compose venv backup-filestore-restic
|
|
1322
1340
|
```
|
|
1323
1341
|
|
|
1324
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.
|
|
@@ -1330,7 +1348,7 @@ Restore the selected database's filestore from a Restic snapshot. Stop Odoo befo
|
|
|
1330
1348
|
**Usage**
|
|
1331
1349
|
|
|
1332
1350
|
```text
|
|
1333
|
-
{odoo-compose|odoo-compose
|
|
1351
|
+
{odoo-compose|odoo-compose venv} restore-filestore-restic [--root ROOT] [--force] [SNAPSHOT]
|
|
1334
1352
|
```
|
|
1335
1353
|
|
|
1336
1354
|
**Arguments**
|
|
@@ -1359,7 +1377,7 @@ Restore the selected database's filestore from a Restic snapshot. Stop Odoo befo
|
|
|
1359
1377
|
odoo-compose restore-filestore-restic --force latest
|
|
1360
1378
|
|
|
1361
1379
|
# Native workflow:
|
|
1362
|
-
odoo-compose
|
|
1380
|
+
odoo-compose venv restore-filestore-restic --force latest
|
|
1363
1381
|
```
|
|
1364
1382
|
|
|
1365
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).
|
|
@@ -1371,7 +1389,7 @@ Neutralize a restored production database for development or testing, then execu
|
|
|
1371
1389
|
**Usage**
|
|
1372
1390
|
|
|
1373
1391
|
```text
|
|
1374
|
-
{odoo-compose|odoo-compose
|
|
1392
|
+
{odoo-compose|odoo-compose venv} neutralize [--root ROOT] [--dry-run [OUTPUT_DIR]]
|
|
1375
1393
|
```
|
|
1376
1394
|
|
|
1377
1395
|
**Options**
|
|
@@ -1394,9 +1412,9 @@ odoo-compose neutralize --dry-run
|
|
|
1394
1412
|
odoo-compose neutralize --dry-run ./preview-sql
|
|
1395
1413
|
|
|
1396
1414
|
# Native workflow:
|
|
1397
|
-
odoo-compose
|
|
1398
|
-
odoo-compose
|
|
1399
|
-
odoo-compose
|
|
1415
|
+
odoo-compose venv neutralize
|
|
1416
|
+
odoo-compose venv neutralize --dry-run
|
|
1417
|
+
odoo-compose venv neutralize --dry-run ./preview-sql
|
|
1400
1418
|
```
|
|
1401
1419
|
|
|
1402
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.
|
|
@@ -1451,10 +1469,10 @@ odoo-compose neutralize
|
|
|
1451
1469
|
docker compose up -d odoo
|
|
1452
1470
|
|
|
1453
1471
|
# Native workflow:
|
|
1454
|
-
odoo-compose
|
|
1455
|
-
odoo-compose
|
|
1456
|
-
odoo-compose
|
|
1457
|
-
odoo-compose
|
|
1472
|
+
odoo-compose venv restore-db --copy ./odoo-backups/production.dump
|
|
1473
|
+
odoo-compose venv restore-filestore ./odoo-backups/production-filestore.tar.gz
|
|
1474
|
+
odoo-compose venv update --all
|
|
1475
|
+
odoo-compose venv neutralize
|
|
1458
1476
|
```
|
|
1459
1477
|
|
|
1460
1478
|
The Docker example uses `docker compose stop odoo` and `docker compose up -d odoo` intentionally: only the Odoo service is stopped and restarted, while PostgreSQL remains available for the restore operations.
|
|
@@ -1466,7 +1484,7 @@ Generate shell-completion definitions for either CLI. See [Shell completion](#sh
|
|
|
1466
1484
|
**Usage**
|
|
1467
1485
|
|
|
1468
1486
|
```text
|
|
1469
|
-
{odoo-compose|odoo-compose
|
|
1487
|
+
{odoo-compose|odoo-compose venv} completion {bash|zsh|fish|powershell}
|
|
1470
1488
|
```
|
|
1471
1489
|
|
|
1472
1490
|
**Arguments**
|
|
@@ -1536,7 +1554,7 @@ db_password = odoo
|
|
|
1536
1554
|
CLI override example:
|
|
1537
1555
|
|
|
1538
1556
|
```bash
|
|
1539
|
-
odoo-compose
|
|
1557
|
+
odoo-compose venv setup odoo-project.ini --sync-all --create-venv -e branch=dev -e db=odoo_dev
|
|
1540
1558
|
```
|
|
1541
1559
|
|
|
1542
1560
|
### `[virtualenv]`
|
|
@@ -1689,7 +1707,7 @@ This section is optional.
|
|
|
1689
1707
|
|
|
1690
1708
|
When present, it contains Odoo server configuration values written into `ROOT/odoo-configs/odoo-server.conf`.
|
|
1691
1709
|
|
|
1692
|
-
For `odoo-compose
|
|
1710
|
+
For `odoo-compose venv`, omitting `[config]` still generates a valid config file with generated values such as `addons_path` and `data_dir`. The Docker workflow does not generate `odoo-server.conf`.
|
|
1693
1711
|
|
|
1694
1712
|
You can define standard Odoo configuration options here.
|
|
1695
1713
|
|