Skip to content

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:

oops project check [OPTIONS]

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:

oops project check

Exit non-zero on warnings as well:

oops project check --strict

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:

oops project exclude [OPTIONS]

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:

oops project exclude

Write the file without committing:

oops project exclude --no-commit

Run as a pre-commit hook (raises an error if the exclusion list changed, prompting a re-run):

oops project exclude --fail

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:

oops project init [OPTIONS]

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:

oops project init

Include the maildev catch-all SMTP service:

oops project init --with-maildev

Include the SFTP service:

oops project init --with-sftp

Disable --dev=all (production-like setup):

oops project init --no-dev

Use a custom host port:

oops project init --port 8072

Skip generating the VSCode workspace file:

oops project init --without-workspace

Include the Odoo sources as folders in the generated workspace:

oops project init --include-sources

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:

oops project show [OPTIONS]

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:

oops project show

Include the latest GitHub Actions run:

oops project show --token $GH_TOKEN

oops project sync

Synchronise files from the configured remote repository.

Usage:

oops project sync [OPTIONS]

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:

oops project sync

Preview the diff without applying any changes:

oops project sync --dry-run

Apply changes without confirmation:

oops project sync --force

Sync from a specific branch:

oops project sync --branch develop

Sync only specific files/folders (overrides config):

oops project sync -F .pre-commit-config.yaml -F .github/workflows

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:

oops project update [OPTIONS]

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:

oops project update

Pick the latest image automatically without prompting:

oops project update --force