Project¶
Validate project configuration and manage the Odoo Docker image.
Modules:
| Name | Description |
|---|---|
check |
Validate project configuration and list available Odoo Docker images. |
exclude |
Generate the exclusion list for pre-commit hooks in the .pre-commit-config.yaml file. |
init |
Bootstrap a new Odoo project in the current repository. |
show |
Display a summary of the current project. |
sync |
Synchronise files from a remote repository (no parent relationship). |
update |
Update odoo_version.txt to the latest available Docker image. |
oops project check¶
Validate project configuration and list available Odoo Docker images.
Checks for mandatory project files, verifies the configured Odoo image, and reports warnings and errors. Exits non-zero if errors are found; with --strict, warnings also cause a non-zero exit.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--strict |
boolean | Treat warnings as errors | False |
--help |
boolean | Show this message and exit. | False |
Examples:
Run project checks and report warnings and errors:
Exit non-zero on warnings as well:
oops project exclude¶
Generate the exclusion list for pre-commit hooks in the .pre-commit-config.yaml file.
It checks all the addons in the root of the project and if the project is not owned by <manifest.author>,
it excludes the addon.
The exclusion list uses a start and end tags to identify the section to update. The tags are the following:
- start: # oops:exclude:start
- end: # oops:exclude:end
The tags must be placed after the "(?x)" line in the "exclude" part of the .pre-commit-config file. Like this:
exclude: |
(?x)
# oops:exclude:start
# oops:exclude:end
^setup/|/static/description/index\.html$|
.svg$|/tests/([^/]+/)?cassettes/|^.copier-answers.yml$|^.github/|^eslint.config.cjs|^prettier.config.cjs|
^README\.md$|
/static/(src/)?lib/|
^docs/_templates/.*\.html$|
readme/.*\.(rst|md)$|
/build/|/dist/|
/tests/samples/.*|
(LICENSE.*|COPYING.*)|
.third-party/|
third-party/
Automatically, the modules to exclude will be added between the tags.
If the tags are not found in the file, nothing is done.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--dry-run |
boolean | Show what would happen, do nothing. | False |
--no-commit |
boolean | Do not commit changes. | False |
--fail |
boolean | Raise an error if the exclusion list is updated (pre-commit). | False |
--help |
boolean | Show this message and exit. | False |
Examples:
Write the pre-commit exclusion file and commit:
Write the file without committing:
Run as a pre-commit hook (raises an error if the exclusion list changed, prompting a re-run):
oops project init¶
Bootstrap a new Odoo project in the current repository.
Reads the Docker image reference from odoo_version.txt, then writes:
- docker-compose.yml — Compose stack (Odoo + Postgres, optional maildev/SFTP)
- .config/odoo.conf — Odoo server configuration file
.code-workspace — VSCode workspace with Odoo analysis paths (skipped with --without-workspace)
Prompts before overwriting any existing file.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--with-maildev |
boolean | Enable maildev service. | False |
--with-sftp |
boolean | Enable SFTP service. | False |
--no-dev |
boolean | Disable --dev=all flag. | False |
--port |
integer | Host port mapped to Odoo. | 8069 |
--without-workspace |
boolean | Don't generate a VSCode workspace file. | False |
--include-sources |
boolean | Include the Odoo sources as folders in the workspace. | False |
--help |
boolean | Show this message and exit. | False |
Examples:
Generate docker-compose.yml, .config/odoo.conf, and a VSCode workspace file for the current project:
Include the maildev catch-all SMTP service:
Include the SFTP service:
Disable --dev=all (production-like setup):
Use a custom host port:
Skip generating the VSCode workspace file:
Include the Odoo sources as folders in the generated workspace:
oops project show¶
Display a summary of the current project.
Shows Odoo version, Docker image release date, available image updates, Python requirements, system packages, git remote and release info. With a GitHub token, also shows the latest Actions workflow run.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--token |
text | GitHub token to request API, needs actions:read or repo scope. Envvar is also supported: TOKEN, GH_TOKEN, GITHUB_TOKEN. | None |
--minimal |
boolean | Show minimal output. | False |
--help |
boolean | Show this message and exit. | False |
Examples:
Display the full project summary:
Include the latest GitHub Actions run:
oops project sync¶
Synchronise files from the configured remote repository.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--dry-run |
boolean | Show the diff without applying changes. | False |
--force, -f |
boolean | Apply changes without asking for confirmation. | False |
--branch, -b |
text | Remote branch to sync from (overrides sync.branch). | None |
--files, -F |
text | Files/folders to sync (overrides sync.files, repeatable). | None |
--help |
boolean | Show this message and exit. | False |
Examples:
Sync files from the configured remote repository with confirmation prompt:
Preview the diff without applying any changes:
Apply changes without confirmation:
Sync from a specific branch:
Sync only specific files/folders (overrides config):
oops project update¶
Update odoo_version.txt to the latest available Docker image.
Queries the image registry for newer releases of the currently configured Odoo version and prompts the user to select one. With --force, picks the latest image automatically and commits the change.
Usage:
Options:
| Name | Type | Description | Default |
|---|---|---|---|
--force |
boolean | Don't ask for confirmation | False |
--help |
boolean | Show this message and exit. | False |
Examples:
Interactively select a new Odoo image:
Pick the latest image automatically without prompting: