Introduction

Overview
This project aims to simplify following processes:
- development and maintenance of addons for Odoo
- deployment and maintenance of Odoo servers.
This project is successor of odoo-helper-scripts
Following features available:
- Super easy installation of Odoo for development
- Super easy installation of Odoo for production (see docs)
- Simple way to manage multiple development instances of Odoo on same developer's machine
- Everything (including nodejs) installed in virtualenv - no conflicts with system packages
- Best test runner for Odoo modules:
- Easy run test for developed modules
- Show errors in the end of the log, that is really useful feature for large (few megabytes size test logs)
- Test module migrations with ease
- Super easy of third-party addons installation:
- Install modules directly from Odoo Apps
- Easily connect git repositories with Odoo modules to Odoo instance managed by Odood
- Automatic resolution of addons dependencies:
- Handle
requirements.txt - Handle
odoo_requirements.txt
- Handle
- Simple database management via commandline: create, backup, drop, rename, copy database
- Simple installation via prebuilt debian package (see releases)
- Support for assemblies: single repo with all addons for project, populated in semi-automatic way.
- Build with docker-support in mind
- Basic integration with odoo-module-migrator. See docs
The War in Ukraine
2022-02-24 Russia invaded Ukraine...
If you want to help or support Ukraine to stand against russian inavasion, please, visit the official site of Ukraine and find the best way to help.
Thanks.
Supported OS
Currently debian-based operation systems supported. Tested on Ubuntu and Debian. Theoretically if should work on MacOS also.
Supported Odoo versions
- Odoo 19.0 (experimental)
- Odoo 18.0 (tested)
- Odoo 17.0 (tested)
- Odoo 16.0 (tested)
- Odoo 15.0 (tested)
- Odoo 14.0 (tested)
- Odoo 13.0 (tested)
- Odoo 12.0 (tested)
- Odoo 11.0 (best efforts)
- Odoo 10.0 (best efforts)
- Odoo 9.0 (best efforts)
- Odoo 8.0 (best efforts)
- Odoo 7.0 (partial)
Installation (as Debian Package)
To install Odood, just find debian package in releases and install it. Thats all.
Note, that usually you will need to manually install additional system packages, that include:
- postgresql - if you plan to use local instance of postgresql.
- wkhtmltopdf - Required to generate pdf reports. See Odoo docs for more info.
Installation (on MacOS)
There is experimental support for MacOS implemented as homebrew's tap. Just run:
brew tap katyukha/odood
brew install odood
It is recommented to use pyenv on MacOS to init Odood projects.
For example, use option --pyenv when creating new odood project via odood init:
odood init -v 18 --pyenv
Also, take into account that you have to install missing dependencies on MacOS. If you know how to make MacOS support better, just create issue or pull request with your ideas or patches.
Docker images
Odood has pre-build docker images with already installed Odoo and Odood. These images could be useful as base to distribute products based on Odoo as docker images. Take a look for base images at github package registry.
License
Odood is distributed under MPL-2.0 license.
Quick start
Overview
Odood is Command Line Interface (CLI) tool.
Odood and each subcommand of Odood has option --help, thus
if you are interested what it can do, just type odood --help :)
Installation
In order to install Odood, you have to do following:
- Visit releases page
- Download
.debpackage for desired architecture - Install downloaded
.debpackage.
Usually you will need to manually install additional system packages, that include:
- postgresql - if you plan to use local instance of postgresql.
- wkhtmltopdf - Required to generate pdf reports. See Odoo docs for more info.
Odoo installation
There are two types of Odoo installation supported by Odood:
- Development
- Production
Development installation
Development installation is designed to be super easy for developer. Thus it just installs Odoo and everything needed into specified directory. No specific user for Odoo process, no access restrictions, etc. Instead, it is designed to be able to work with multiple Odoo instances installed on same system.
To install Odoo 18 for development, following command could be used:
odood init -i odoo-18 -v 18
But, usually it is used with other options, to use separate database user and separate port for each development Odoo instance. For example:
odood init -i odoo-18 -v 18 --db-user=odoo18 --http-port=18069
After this command, Odoo 18 will be installed in odoo-18 directory.
Next, if current working directory is inside odoo-18, then odood command could be used to manage this instance.
Production installation
Production installation more focuses on security, and stabiltiy. Thus, it do following additional tasks:
- Creates separate user to run Odoo
- Creates systemd service or init script to run Odoo at startup
- Optionally configures:
- logrotate
- nginx
- fail2ban
For more info take a look at Production Deployment article.
Server management
After installation following commands available to manage Odoo server:
odood server start- start Odoo in backgroundodood server stop- stop Odoo if runningodood server restart- restart Odooodood server browse- open Odoo in your browserodood server run- run odoo itself.odood server log- view server logs (automatically uselessutility to view Odoo server log)odood server status- Check if Odoo server is running or notodood status- status of this Odoo instance.
Database management
Now we can create new Odoo database inside installed Odoo instance.
To do this we can use following command:
odood db create --demo --tdb --recreate
This command will create new test Odoo database on this Odoo instance.
The name for test odoo database is generated automatically as <dbuser>-odood-test.
Such test database is useful during development stage: you do not need to thing about name of database
during frequent database creation/recreation.
Or, we can create demo database with specific name
odood db create --demo --recreate my-demo-db
Next we can view list of databases:
odood db list
Also, there is shortcut for this frequently used command:
odood lsd
Additionally following commands may be useful:
odood db dropodood db copyodood db backupodood db restoreodood db renameodood db stun- disable cron jobs and mail serversodood db list-installed-addons- show list of addons installed in specific DB
Addons management
One of the frequent usecases of Odood is management of third-party modules (or own addons).
Install third-party addon
Let's install for example module generic_location from generic-addons repository.
To do this, we can use following command:
odood repo add https://github.com/crnd-inc/generic-addons
Or we can use shortcut:
odood repo add --github crnd-inc/generic-addons
This command will fetch specified git repository, and store it at repositories/crnd-inc/generic-addons directory in project root,
and all addons in that repo will be automatically symlinked to custom_addons directory inside project root,
thus they will become visible for Odoo.
Next, we could use following command to install module generic_location into created database:
odood addons install -d my-demo-db generic_location
After this command, module generic_location will be installed in database my-demo-db
Update third-party modules
One of the most frequent tasks related to management of Odoo servers is update of third party modules.
In our case, we have repository generic-addons, and we may need to update modules from this repo.
To do this, we have to use following algorithm:
0. Take backup (use odood db backup -a for this)
- Pull changes from repo (use
git pullfor this) - Stop Odoo server
- Install / update all required dependencies
- Run update for all modules from this repo for all databases.
- Start Odoo server again
Using Odood for our example, it could be done in following way:
# Change current working directory to repository that we want to update
cd repositories/crnd-inc/generic-addons
# Pull changes for the repository
git pull
# We have to relink addons in case when new addons were added
# or new python dependencies were added.
# With this command Odood will handle most of this cases automatically
odood addons link .
# Update all modules inside current directory for all databases
# Also, automatically update list of addons in each database.
# This command will automatically stop Odoo before update if needed
# and start again after update.
odood addons update -a --ual --dir .
Addons management commands
add- Add addons to the projectupdate-list-Update list of addons.link- Link addons in specified directory.generate-py-requirements- Generate python's requirements.txt from addon's manifests. By default, it prints requirements to stdout.update- Update specified addons.install- Install specified addons.is-installed- Print list of databases wehre specified addon is installed.uninstall- Uninstall specified addons.list- List addons in specified directory.find-installed- Find addons installed on specified database(s).
Running tests
During development, it is frequent case to run automated tests for modules being developed.
So, Odood provides separate command odood test that runs tests for specified modules.
It is recommended to look at --help for this command (odood test -h) to get more info about what it can do.
In our case, let's run tests for module generic_location. to do this, we can run following command:
odood test -t generic_location
This command will create temporary database to run tests in, automatically find module generic_location and run tests for it with colored highlights for errors and warnings.
Also, it is possible to run test for whole repo.
Assume, we are inside repositories/crnd-inc/generic-addons, then we can just run command:
odood test -t --dir .
It will automatically find all addons in this repo, and run tests for all of them on same temporary database.
Virtualenv managment
Additionally, sometimes it is useful to manage virtualenv of Odood project.
For this reason, Odood has ododo venv subcommand, that contains various commands to manage virtual environment of this project:
install-dev-tools- Install Dev Toolsrun- Run command in this virtual environment. The command and all arguments must be specified after '--'. For example: 'odood venv run -- ipython'reinstall-odoo- Reinstall Odoo to different Odoo version.npm- Run npm for this environment. All arguments after '--' will be forwarded directly to npm.ipython- Run ipython in this environment. All arguments after '--' will be forwarded directly to python.python- Run python for this environment. All arguments after '--' will be forwarded directly to python.update-odoo- Update Odoo itself.pip- Run pip for this environment. All arguments after '--' will be forwarded directly to pip.reinstall- Reinstall virtualenv.install-py-packages- Install Python packages
Production deployment
Overview
Production installation more focuses on security, and stabiltiy. Thus, it do following additional tasks:
- Creates separate user to run Odoo
- Creates systemd service or init script to run Odoo at startup
- Optionally configures:
- logrotate
- nginx
- fail2ban
- certbot
Also, production installation expectes that it is running on clean system, and no other Odoo installed on same system.
Indirect dependencies
Note, that Odood will not automatically install indirect dependencies, thus you have to manually install following system packages (if needed):
- postgresql - it is required to install postgresql server manually, before running
odood deploycommand if you use--local-postgresoption. - wkhtmltopdf - Required to generate pdf reports. See Odoo docs for more info.
- nginx - if you want to exopose installed Odoo to external world via
nginx. In this case,Odoodwill automatically generate template config fornginx. - certbot - if you want to automatically generate Let's Encrypt certificates.
- fail2ban [Optional] - if you want to automatically block incorrect logins by IP. In this case Odood will automatically generate configs for
fail2ban.
In case of Ubuntu:24.04 system required dependencies could be installed via command:
sudo apt install postgresql nginx certbot
wget -O /tmp/wkhtmltopdf-0.12.6.1-3.deb https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb
sudo apt install /tmp/wkhtmltopdf-0.12.6.1-3.deb
Note: choose right release for your operation sysmte, when installing wkhtmltopdf
Deployment
So, let's assume that all needed indirect system dependencises (in example it is only postgresql server) already installed. Then, use following command to install Odoo 18 for production with local postgres:
sudo odood deploy -v 18 --local-postgres --supervisor=systemd
After this command completed, there will be installed Odoo and it will be configured to use local postgresql.
This Odoo instance will be managed by systemd service.
Note: on production installation each call to odood have to be run as sudo or from superuser.
Odood will automatically handle switching access rights when needed.
Also, it is recommended to use assembly functionality to manage third-party addons on production instances. This way, it is possible to deploy server in following way:
sudo odood deploy -v 18 \
--local-postgres \
--supervisor=systemd \
--assembly-repo=htpps://github.com/my/assembly
This way, server will be automatically configured to use assembly htpps://github.com/my/assembly
Complete sample: Pulic server
Following list of commands will install Odoo with configured nginx, postgresql, certbot and fail2ban on sever available in public space.
This sample, assumes, that you have control over your domain, and already point your domain to server where Odoo have to be installed.
Note, you have to update command below with your correct architecture.
So, Let 's run following commands to get complete production ready Odoo installation on Ubuntu 24.04 on amd64 architecture:
sudo apt-get update -yq # update list of packages
sudo apt-get upgrade -yq # upgrade packages
# Install required system dependencies
sudo apt-get install -yq wget nginx postgresql certbot fail2ban
# Download and install latest version of Odood
wget -O /tmp/odood.deb https://github.com/katyukha/Odood/releases/download/v0.5.2/odood_v0.5.2_amd64.deb
sudo apt install -yq /tmp/odood.deb
# Download and install correct version of Wkhtmltopdf
wget -O /tmp/wkhtmltopdf-0.12.6.1-3.deb https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb
sudo apt install -yq /tmp/wkhtmltopdf-0.12.6.1-3.deb
# Deploy Odoo 18.0 on the server
sudo odood deploy \
-v 18 \
--local-postgres \
--supervisor=systemd \
--enable-logrotate \
--enable-fail2ban \
--local-nginx-server-name=my.test.server \
--letsencrypt-email=me@my.test.server
Complete sample: Private network server with self-signec SSL certificates
Following list of commands will install Odoo with configured nginx, postgresql, on sever private network with self-signed SSL certificates under following paths:
- /etc/nginx/ssl/my.test.server.int.crt/etc/nginx/ssl/my.test.server.int.crt
- /etc/nginx/ssl/my.test.server.int.key
This sample, assumes, that you have already generate self-signed certificates.
Note, you have to update command below with your correct architecture.
So, Let 's run following commands to get complete production ready Odoo installation on Ubuntu 24.04 on amd64 architecture:
sudo apt-get update -yq # update list of packages
sudo apt-get upgrade -yq # upgrade packages
# Install required system dependencies
sudo apt-get install -yq wget nginx postgresql certbot fail2ban
# Download and install latest version of Odood
wget -O /tmp/odood.deb https://github.com/katyukha/Odood/releases/download/v0.5.2/odood_v0.5.2_amd64.deb
sudo apt install -yq /tmp/odood.deb
# Download and install correct version of Wkhtmltopdf
wget -O /tmp/wkhtmltopdf-0.12.6.1-3.deb https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb
sudo apt install -yq /tmp/wkhtmltopdf-0.12.6.1-3.deb
# Deploy Odoo 18.0 on the server
sudo odood deploy \
-v 18 \
--local-postgres \
--supervisor=systemd \
--enable-logrotate \
--local-nginx-server-name=my.test.server.int \
--local-nginx-ssl \
--local-nginx-ssl-cert=/etc/nginx/ssl/my.test.server.int.crt \
--local-nginx-ssl-key=/etc/nginx/ssl/my.test.server.int.key
Assembly
Assembly is a reposityry that contains all third-party odoo addons needed for certain server, that is populated with addons from various sources in semi-automatic way.
The main purpose of assembly is to simplify deployment process to production servers.
Assembly contains odood-assembly.yml file (that is also referenced as assembly-spec),
that describes list of addons and list of git sources to populate this assembly with.
All third-party addons will be placed into dist directory inside assembly during sync operation.
After spec is created/updated there is need to run sync operation as next step.
The sync operation updates assembly with latest versions of addons according to the spec definition.
So, after sync is completed, and changes pushed to assembly git repo,
the servers that use this assembly could be updated in single step, by calling command
odood assembly upgrade that will do all the job.
Assembly Spec
Assembly spec is described in odood-assembly.yml file in root directory of assembly.
Assembly spec is YAML file that looks like:
spec:
addons-list:
- name: generic_m2o
- name: generic_mixin
- name: generic_tag
sources-list:
- url: https://github.com/crnd-inc/generic-addons
ref: '17.0'
Following shortcuts available for sources, to make spec more readable:
spec:
addons-list:
- name: generic_mixin
sources-list:
- github: crnd-inc/generic-addons # converted to https://github.com/crnd-inc/generic-addons
- oca: web # converted to https://github.com/OCA/web
Assembly workflow
Typical assembly workflow could be splitted on two parts:
- Assembly maintenance
- Server operations
The first one includes such operations like:
- Initialization of new assembly
- Management of assembly spec, that describes what addons and from what sources have to be included in assembly.
- Assembly synchronization - just pull latest versions of addons defined in spec, and update the assembly repo.
The second one, includes operations to be performed on server side. These operations includes:
- Configure server to use assembly
- Upgrade server
Assembly maintenance
To create assembly, we have to have some Odood instance (may be local development instance), that will be used to maintain assembly. So, let's assume that we have some Odood instance for Odoo 17, and we need to configure it to use assembly. We can initialize assembly as follows:
odood assembly init
This way, odood will create empty assembly for that project.
The generated assembly config (odood-assembly.yml) could look like:
spec:
addons-list: []
sources-list: []
If we want to add new module my_addon from github.com/my/repo to assembly, then we have to do add following changes in spec (odood-assembly.yml):
- Add name of addon in
addons-listsection ofspec - Add information about source to fetch this addons from in
sources-listsection ofspec
So, in result, our spec could look like:
spec:
addons-list:
- name: my_addon
sources-list:
- url: https://github.com/my/repo
ref: 17.0
As next step, we have to sync the assembly, to make Odood pull latest versions of selected modules from specified sources. We can do it using following command:
odood assembly sync
After this command, specified addons will be located (updated) in dist folder inside assembly, and ready to commit.
Also, we have to manually add odood-assembly.yml to git index before commit, to make sure spec is committed too.
So, next we have to push assembly to some git repo and then we could use it on servers.
Server operations
Initialize server with assembly
At first, on the server we have to configure it in the way to use already existing assembly (from git repo).
To do this, we have to call command odood assembly init specifying git repository to initialize assembly from.
For example:
odood assembly init --repo <url of git repo with assembly>
As next step, it is good to link assembly, to ensure all addons from assembly is available on the server. To do this, we can use following command
odood assembly link --ual
So, after this steps the server is configured to use assembly.
Update of server assembly
When server is configured to use assembly, then server management becomes pretty simple - all server updates could be done via single command:
odood assembly upgrade [--backup]
That will do all the job: 0. Optionally backup all databases
- pull assembly changes,
- relink modules,
- update addons on all databases.
Assembly management
There is group of commands designed to deal with assemblies: odood assembly.
Run odood assembly --help to get more info about available commands.
This group contains following commands:
odood assembly init- allows to initalize assembly (new assembly or clone existing assembly from git)odood assembly use- allows to configure server to use assembly from specified path. Useful in CI flows.odood assembly status- show current status of assemblyodood assembly sync- this command synchronizes assembly to actual state. This operation includes following steps done automatically:- Clone or update (pull) all git sources listed in spec
- Remove all addons in
distfolder of assembly - Copy latest versions of addons to
distfolder - Add copied addons to git index of assembly repo
- Optionally commit chages to assembly git repo
odood assembly link- completely relink this assembly (remove all links to assembly fromcustom_addons, and create new links). This is needed to ensure that only actual assembly addons linked.odood assembly pull- pull changes for assembly repo. Useful during server updateodood assembly upgrade- simple way to upgrade server that is configured to use assembly.odood addons update --assembly- this option could be used forodood addons install/update/uninstallcommands to install/update/uninstall addons contained in assembly.
Also, command odood addons find-installed could be used to generate spec for assembly based on third-party addons installed in specified database(s).
This is useful to migrate already existing Odood project to use assembly instead of multiple repositories.
Private git sources
Assemblies can clone private git repostitories via access tokens.
For each source in spec, it is possible to specify name or access-group,
that could be used to check environment variables for access credentials to clone specified sources.
For example, if following source defined:
spec:
addons-list:
- name: my_addon
sources-list:
- github: my/private-repo
ref: 17.0
access-group: my_repos
Odood will check environment variable ODOOD_ASSEMBLY_my_repos_CRED for access credentials for this repo.
The format for this variable is: user:token
Sample CI configuration to build/update assemblies automatically
Usually assembiles require CI to update modules automatically or semi-automatically.
Build assembly on GitHub CI
Sample GitHub Actions workflow configuration, that will build assembly automatically:
name: Sync assembly
on:
push:
branches:
- '18.0-*'
workflow_dispatch:
jobs:
sync-assembly:
name: Sync assembly
if: "!contains(github.event.head_commit.message, '[SYNC] Assembly synced')"
runs-on: ubuntu-latest
strategy:
fail-fast: true
permissions:
contents: write
pull-requests: write
container:
image: ghcr.io/katyukha/odood/odoo/18.0:0.5.2
steps:
- uses: actions/checkout@v4
- name: Add current directory as safe directory for git
run: git config --global --add safe.directory "$(pwd)"
- name: Use current repo as assembly
run: odood --config-from-env assembly use .
- name: Sync assembly
run: |
odood --config-from-env -v -d assembly sync \
--changelog \
--commit \
--commit-user='Github Action' \
--commit-email='github-action@odood.dev' \
--push
This will run assembly build job for all branches starting from 18.0- prefix.
Thus, usual flow looks like:
- create new branch
18.0-update - wait while job started
- When job completed, create pull request
- Review and merge pull request
- Delete
18.0-updatebranch (or configure to delete stale head branches automatically)
Build assembly on GitLab CI
Sample GitLab CI configuration, that will build assembly automatically:
build_assembly_on_commit:
image: ghcr.io/katyukha/odood/odoo/18.0:0.5.2
before_script:
# Add current directory as safe, thus allowing git operations in this dir.
- git config --global --add safe.directory "$(pwd)"
# Configure odood container to use this repo as assembly
- odood --config-from-env assembly use .
script:
# Create temporary branch to allow push work from Odood
- git checkout -b 18.0-tmp-assembly
# Do assembly sync
- odood --config-from-env assembly sync --commit --commit-user="GitLab Bot" --commit-email="gitlab-bot@odood.dev" --push --push-to "$CI_COMMIT_BRANCH"
except:
variables:
# Do not run package on commits created by packager itself
- $CI_COMMIT_MESSAGE =~ /\[SYNC\] Assembly synced/
refs:
# Do not run job for stable branches
- "18.0"
only:
refs:
- branches
Note, that it is required to allow gitlab-ci-token to push changes back to project. This have to be configured in repository settings (CI/CD Settings -> Job token permissions)
Usually, it is required to create new branch to run build job.
Odood Directory Structure
Odood directory structure is similat to that one for odoo-helper-scripts,
so most users of odoo-helper-scripts will not notice that changes.
Odood project root directory contains following folders:
backups- directory for backups generated byodood db backupcommandconf- directory for configurations used by this odood project. Usualy contains two files: one for normal local config and one that is used to run testsodoo.conf- main configuration used by defaultodoo.test.conf- configuration used to run tests, usualy have different port thenodoo.conf, and does not specify logfile, thus all log messages will be written to stderr and thus catched byodoodtest runner
custom_addons- directory for all addons that are not part of Odoo. Usualy contains only symlinks to addons.data- Odoo data directory used to store files and sessionsdownloads- Directory contains addons downloaded directly from Odoo Market.odoo- Odoo source code downloaded from github.repositories- This directories is designed to store git repositories that contain additional (non-standard) odoo addons.venv- virtualenv directoryodood.yml- configuration for this odood project.
Optional directories:
assembly- if project is configured to use assembly, this directory will contain assembly repository.cache- this directory is designed to contain various caches. For example, git sources defined in assembly spec, will be clonned in cache, and reused for next sync operations.
Frequently used commands
Short list of frequently used Odood commands.
Each command in this list supports -h or --help option, that will
print actual documentation on the command.
Thus, if you want to get most complete and actual documentation on particular command,
just call if with -h option.
Server management
odood start- start odoo serverodood restart- restart odoo serverodood stop- stop odoo-helper serverodood log- see odoo server logsodood browse- open running odoo installation in browser
Addons management
odood addons list <path>- list odoo addons in specified directoryodood addons update-list- update list of available addons in all databases available for this serverodood addons install <addon1> [addonN]- install specified odoo addons for all databases available for this serverodood addons update <addon1> [addonN]- update specified odoo addons for all databases available for this serverodood addons uninstall <addon1> [addonN]- uninstall specified odoo addons for all databases available for this serverodood addons update --dir <path>- find all installable addons in specified directory and update themodood addons install --dir <path>- find all installable addons in specified directory and install themodood addons link .- link all addons in current directory.odood addons add -h- add third-party addons from odoo-apps (free only) or from odoo-requirements.txt
Tests
odoo-helper test -t <module>- test single module on temporary databaseodoo-helper test -t --dir .- test all installable addons in current directoryodoo-helper test -t --migration --dir .- run migration test for all installable addons in current directory. This includes switching to stable branch, installing modules, optionally populating with extra data, switching back to test branch and running tests for migrated addons.odoo-helper test --coverage-html <module>- test single module and create html coverage report in current dirodoo-helper test --coverage-html --dir .- test all installable addons in current directory and create html coverage report in current dir
Pre-commit
Odood use pre-commit to run various linters, etc. Thus following commands are used to deal with it:
odood pre-commit init- Initialize pre-commit for repository. Create default pre-commit configurations.odood pre-commit set-up- Install pre-commit and all necessary dependencies in virtualenv.odood pre-commit run- Run pre-commit hooks for this repo manually.
Repository management
odood repo add <url>- fetch repository with third-party addons from git repo specified byurlodood repo add --oca <name>- fetch OCA repository namednamefrom OCA git repo. For example,--oca webmeans repo web from OCA.odood repo add --github <username/repository>- shortcut to easily fetch repo from github, by specifying only github username and repo name. For example:--github oca/webmeans repo web from OCA.odood repo bump-versions- increase versions of changed modules in git repo.
Database management
odood db list- list all databases available for current odoo instanceodood db create my_db- create databaseodood db backup -d my_db- backup my_dbodood db backup -a- backup all databases on the serverodood db drop my_db- drop databaseodood db restore my_db path/to/backup- restore database from backup
Translation management
odood tr regenerate --lang uk_UA <addon1> [addon2]...- regenerate translations for specified language for specified addonsodood tr regenerate --lang uk_UA --addon-dir <path>- regenerate translations for specified language for all installable addon in specified path
Assembly management
odood assembly init- initialize new empty assembly for this instanceodood assembly init --repo=git@github.com:my/assembly.git- initialize this instance with assembly from specified repoodood assembly upgrade- pull latest changes from assembly and upgrade serverodood assembly sync- synchronize assembly according to spec: fetch latest versions of modules from spcified sources and update assembly repoodood assembly link- relink all addons that are in assembly
Virtualenv management
odood venv run -- <command and args>- Run some command inside virtualenv of this instance.odood venv install-py-packages- Install specified python packages in this virtualenv.odood venv install-dev-tools- Install development tools inside virtualenv of this instance.odood ipython- run ipython inside virtualenv of this instance.odood venv reinstall- resinstall virtual environment.odood venv update-odoo- update Odoo in this instance.
Odood Command Reference
This page lists all commands available in Odood and their help messages.
odood
odood: Easily manage odoo installations. (dev)
USAGE
$ odood [-h] [--version] [-v] [-q] [-d] command
FLAGS
-h, --help prints help
--version prints version
-v, --verbose Enable verbose output
-q, --quiet Hide unnecessary output
-d, --debug Show additional debug information.
SUBCOMMANDS
Dev Tools:
pre-commit Work with pre-commit dev tool.
psql Run psql for specified database
script Run scripts in Odood environment.
translations Manage translations for this project.
Main:
addons Manage third-party addons.
assembly Manage assembly of this project
db Database management commands
deploy Deploy production-ready Odoo.
init Initialize new odood project.
odoo Odoo-related utility commands.
repo Manage git repositories.
server Server management commands.
status Show the project status.
test Run tests for mudles.
venv Manage virtual environment for this project.
Shortcuts:
browse Open odoo in browser
log View server logs.
lsa List addons in specified directory.
lsd Show the databases available for this odoo instance.
restart Restart the server running in background.
start Run the server in background.
stop Stop the server
tr Manage translations for this project.
ual Update list of addons.
System:
config Manage config of the project
discover Discover already installed odoo, and configure Odood to manage it.
info Print info about this Odood project.
odood script
odood script: Run scripts in Odood environment.
USAGE
$ odood script [-h] py|sql
FLAGS
-h, --help prints help
SUBCOMMANDS
py Run Python script in this environment.
sql Run SQL script in this environment.
odood script py
odood script py: Run Python script in this environment.
USAGE
$ odood script py [-h] -d value script
FLAGS
-h, --help prints help
OPTIONS
-d, --db value Database to run script for
ARGUMENTS
script Path to script to run
odood script sql
odood script sql: Run SQL script in this environment.
USAGE
$ odood script sql [-h] [-n] -d value script
FLAGS
-h, --help prints help
-n, --no-commit Do not commit changes.
OPTIONS
-d, --db value Database to run script for
ARGUMENTS
script Path to script to run
odood odoo
odood odoo: Odoo-related utility commands.
USAGE
$ odood odoo [-h] recompute|shell
FLAGS
-h, --help prints help
SUBCOMMANDS
recompute Odoo-related utility commands.
shell Odoo-related utility commands.
odood odoo recompute
odood odoo recompute: Odoo-related utility commands.
USAGE
$ odood odoo recompute [-h] [--all-db] [-f value] [-d value] -m value
FLAGS
-h, --help prints help
--all-db Recompute for all databases.
OPTIONS
-f, --field value Name of field to recompute.
-d, --db value Name of database to recompute fields for.
-m, --model value Name of model to recompute fields for
odood odoo shell
odood odoo shell: Odoo-related utility commands.
USAGE
$ odood odoo shell [-h] [-d value]
FLAGS
-h, --help prints help
OPTIONS
-d, --db value Database(s) to run shell for.
odood restart
odood restart: Restart the server running in background.
USAGE
$ odood restart [-h] [-t value]
FLAGS
-h, --help prints help
OPTIONS
-t, --timeout value Timeout to wait while server starts (in seconds).
odood info
odood info: Print info about this Odood project.
USAGE
$ odood info [-h] [--json]
FLAGS
-h, --help prints help
--json Print output in json format
odood config
odood config: Manage config of the project
USAGE
$ odood config [-h] update
FLAGS
-h, --help prints help
SUBCOMMANDS
update Update the config.
odood config update
odood config update: Update the config.
USAGE
$ odood config update [-h]
FLAGS
-h, --help prints help
odood discover
odood discover: Discover already installed odoo, and configure Odood to manage it.
USAGE
$ odood discover [-h] odoo-helper
FLAGS
-h, --help prints help
SUBCOMMANDS
odoo-helper Discover odoo-helper-scripts project.
odood discover odoo-helper
odood discover odoo-helper: Discover odoo-helper-scripts project.
USAGE
$ odood discover odoo-helper [-h] [-s] [path]
FLAGS
-h, --help prints help
-s, --system Discover system (server-wide) odoo-helper project installation.
ARGUMENTS
path Try to discover odoo-helper project in specified path.
odood init
odood init: Initialize new odood project.
USAGE
$ odood init [options] -i value
FLAGS
-h, --help prints help
--pyenv Use python from pyenv to initialize virtualenv for project. Install desired py version if needed
--create-db-user [sudo] Create database user automatically during installation.Requires sudo.
OPTIONS
-i, --install-dir value Directory to install odoo to
-v, --odoo-version value Version of Odoo to install
--install-type value Installation type. Accept values: git, archive. Default: archive.
--odoo-branch value Branch in Odoo repo to install Odoo from.
--odoo-repo value Install Odoo from specific repository.
--py-version value Install specific python version. By default system python used
--node-version value Install specific node version.
--db-host value Database host
--db-port value Database port
--db-user value Database port
--db-password value Database password
--http-host value Http host
--http-port value Http port
odood tr
odood tr: Manage translations for this project.
USAGE
$ odood tr [-h] regenerate
FLAGS
-h, --help prints help
SUBCOMMANDS
regenerate Regenerate translations for specified addons.
odood tr regenerate
odood tr regenerate: Regenerate translations for specified addons.
USAGE
$ odood tr regenerate [options] [addon]
FLAGS
-h, --help prints help
--pot-remove-dates Remove dates from generated .pot file.
--pot Generate .pot file for translations.
--pot-update Update translations based on regenerated .pot file.
--missing-only Generate only missing translations.
--no-drop-db Do not drop database after regeneration of translations
OPTIONS
--addon-dir value Directory to search for addons
--addon-dir-r value Directory to recursively search for addons
--lang-file value Combination of lang and file (separated by ':') to generate translations for. For example: uk_UA:uk.
-l, --lang value Language to generate translations for. For example: uk_UA.
ARGUMENTS
addon Specify names of addons as arguments.
odood log
odood log: View server logs.
USAGE
$ odood log [-h]
FLAGS
-h, --help prints help
odood ual
odood ual: Update list of addons.
USAGE
$ odood ual [-h] [-a] [database]
FLAGS
-h, --help prints help
-a, --all Update all databases.
ARGUMENTS
database Path to search for addons in.
odood addons
odood addons: Manage third-party addons.
USAGE
$ odood addons [-h] command
FLAGS
-h, --help prints help
SUBCOMMANDS
add Add addons to the project
find-installed List addons installed in specified databases
update-list Update list of addons.
link Link addons in specified directory.
generate-py-requirements Generate python's requirements.txt from addon's manifests. By default, it prints requirements to stdout.
update Update specified addons.
install Install specified addons.
is-installed Print list of databases wehre specified addon is installed.
uninstall Uninstall specified addons.
list List addons in specified directory.
odood addons add
odood addons add: Add addons to the project
USAGE
$ odood addons add [-h] [--single-branch] [-r] [--manifest-requirements] [--odoo-apps value] [--odoo-requirements value]
FLAGS
-h, --help prints help
--single-branch Clone repository with --single-branch options. This could significantly reduce size of data to be downloaded and increase performance.
-r, --recursive Recursively process odoo_requirements.txt. If set, then Odood will automatically process odoo_requirements.txt file inside repositories mentioned in provided odoo_requirements.txt
--manifest-requirements Install python dependencies from manifest's external dependencies
OPTIONS
--odoo-apps value Add addon from odoo apps.
--odoo-requirements value Add modules (repos) from odoo_requirements.txt file, that is used by odoo-helper-scripts.
odood addons find-installed
odood addons find-installed: List addons installed in specified databases
USAGE
$ odood addons find-installed [-h] [-a] [--non-system] [-d value] [-o value] [-f value]
FLAGS
-h, --help prints help
-a, --all Check all databases
--non-system List only custom addons, that are not default Odoo addons.
OPTIONS
-d, --db value Name of database to to check for addons.
-o, --out-file value Path to file where to store generated requirements
-f, --format value Output format. One of: list, assembnly-spec. Default: list.
odood addons update-list
odood addons update-list: Update list of addons.
USAGE
$ odood addons update-list [-h] [-a] [database]
FLAGS
-h, --help prints help
-a, --all Update all databases.
ARGUMENTS
database Path to search for addons in.
odood addons link
odood addons link: Link addons in specified directory.
USAGE
$ odood addons link [-h] [-f] [-r] [--manifest-requirements] [--ual] path
FLAGS
-h, --help prints help
-f, --force Rewrite already linked/existing addon.
-r, --recursive Search for addons in this directory recursively.
--manifest-requirements Install python dependencies from manifest's external dependencies
--ual Update addons list for all databases
ARGUMENTS
path Path to search for addons in.
odood addons generate-py-requirements
odood addons generate-py-requirements: Generate python's requirements.txt from addon's manifests. By default, it prints requirements to stdout.
USAGE
$ odood addons generate-py-requirements [-h] [-o value] [--dir value] [--dir-r value] [addon]
FLAGS
-h, --help prints help
OPTIONS
-o, --out-file value Path to file where to store generated requirements
--dir value Directory to search for addons to generate requirements.txt for.
--dir-r value Directory to recursively search for addons to generate requirements.txt for.
ARGUMENTS
addon Name of addon to generate manifest for.
odood addons update
odood addons update: Update specified addons.
USAGE
$ odood addons update [options] [addon]
FLAGS
-h, --help prints help
--assembly Search for addons available in assembly
--skip-errors Do not fail on errors during installation.
--start Start server after update (if everything is ok)
--ual Update addons list before install.
-a, --all Update all modules
OPTIONS
-d, --db value Database(s) to apply operation to.
--dir value Directory to search for addons
--dir-r value Directory to recursively search for addons
-f, --file value Read addons names from file (addon names must be separated by new lines)
--skip value Skip addon specified by name.
--skip-re value Skip addon specified by regex.
--skip-file value Skip addons listed in specified file (addon names must be separated by new lines)
ARGUMENTS
addon Specify names of addons as arguments.
odood addons install
odood addons install: Install specified addons.
USAGE
$ odood addons install [options] [addon]
FLAGS
-h, --help prints help
--assembly Search for addons available in assembly
--skip-errors Do not fail on errors during installation.
--start Start server after update (if everything is ok)
--ual Update addons list before install.
OPTIONS
-d, --db value Database(s) to apply operation to.
--dir value Directory to search for addons
--dir-r value Directory to recursively search for addons
-f, --file value Read addons names from file (addon names must be separated by new lines)
--skip value Skip addon specified by name.
--skip-re value Skip addon specified by regex.
--skip-file value Skip addons listed in specified file (addon names must be separated by new lines)
ARGUMENTS
addon Specify names of addons as arguments.
odood addons is-installed
odood addons is-installed: Print list of databases wehre specified addon is installed.
USAGE
$ odood addons is-installed [-h] addon
FLAGS
-h, --help prints help
ARGUMENTS
addon Name of addon or path to addon to check.
odood addons uninstall
odood addons uninstall: Uninstall specified addons.
USAGE
$ odood addons uninstall [options] [addon]
FLAGS
-h, --help prints help
--assembly Search for addons available in assembly
--skip-errors Do not fail on errors during installation.
--start Start server after update (if everything is ok)
OPTIONS
-d, --db value Database(s) to apply operation to.
--dir value Directory to search for addons
--dir-r value Directory to recursively search for addons
-f, --file value Read addons names from file (addon names must be separated by new lines)
--skip value Skip addon specified by name.
--skip-re value Skip addon specified by regex.
--skip-file value Skip addons listed in specified file (addon names must be separated by new lines)
ARGUMENTS
addon Specify names of addons as arguments.
odood addons list
odood addons list: List addons in specified directory.
USAGE
$ odood addons list [options] [path]
FLAGS
-h, --help prints help
--by-path Display addons by paths.
--by-name Display addons by name (default).
--by-name-version Display addon name with addon version
-s, --system Search for all addons available for Odoo.
-r, --recursive Search for addons recursively.
--installable Filter only installable addons.
--not-installable Filter only not-installable addons.
--linked Filter only linked addons.
--not-linked Filter only addons that are not linked.
--with-price Filter only addons that has price defined.
--without-price Filter only addons that does not have price defined.
--assembly Show addons available in assembly
-t, --table Display list of addons as table
OPTIONS
-f, --field value Display provided field in table. This have to be valid field from manifest.
-c, --color value Color output by selected scheme: link - color addons by link status, installable - color addons by installable state.
ARGUMENTS
path Path to search for addons in.
odood lsa
odood lsa: List addons in specified directory.
USAGE
$ odood lsa [options] [path]
FLAGS
-h, --help prints help
--by-path Display addons by paths.
--by-name Display addons by name (default).
--by-name-version Display addon name with addon version
-s, --system Search for all addons available for Odoo.
-r, --recursive Search for addons recursively.
--installable Filter only installable addons.
--not-installable Filter only not-installable addons.
--linked Filter only linked addons.
--not-linked Filter only addons that are not linked.
--with-price Filter only addons that has price defined.
--without-price Filter only addons that does not have price defined.
--assembly Show addons available in assembly
-t, --table Display list of addons as table
OPTIONS
-f, --field value Display provided field in table. This have to be valid field from manifest.
-c, --color value Color output by selected scheme: link - color addons by link status, installable - color addons by installable state.
ARGUMENTS
path Path to search for addons in.
odood pre-commit
odood pre-commit: Work with pre-commit dev tool.
USAGE
$ odood pre-commit [-h] run|init|set-up
FLAGS
-h, --help prints help
SUBCOMMANDS
run Run pre-commit for specified repo.
init Initialize pre-commit for this repo.
set-up Set up pre-commit for specified repo.
odood pre-commit run
odood pre-commit run: Run pre-commit for specified repo.
USAGE
$ odood pre-commit run [-h] [path]
FLAGS
-h, --help prints help
ARGUMENTS
path Path to repository to run pre-commit for.
odood pre-commit init
odood pre-commit init: Initialize pre-commit for this repo.
USAGE
$ odood pre-commit init [-h] [-f] [--no-setup] [path]
FLAGS
-h, --help prints help
-f, --force Enforce initialization. This will rewrite pre-commit configurations.
--no-setup Do not set up pre-commit. Could be used if pre-commit already set up.
ARGUMENTS
path Path to repository to initialize pre-commit.
odood pre-commit set-up
odood pre-commit set-up: Set up pre-commit for specified repo.
USAGE
$ odood pre-commit set-up [-h] [path]
FLAGS
-h, --help prints help
ARGUMENTS
path Path to repository to configure.
odood psql
odood psql: Run psql for specified database
USAGE
$ odood psql [-h] -d value
FLAGS
-h, --help prints help
OPTIONS
-d, --db value Name of database to connect to.
odood venv
odood venv: Manage virtual environment for this project.
USAGE
$ odood venv [-h] command
FLAGS
-h, --help prints help
SUBCOMMANDS
install-dev-tools Install Dev Tools
run Run command in this virtual environment. The command and all arguments must be specified after '--'. For example: 'odood venv run -- ipython'
reinstall-odoo Reinstall Odoo to different Odoo version.
npm Run npm for this environment. All arguments after '--' will be forwarded directly to npm.
ipython Run ipython in this environment. All arguments after '--' will be forwarded directly to python.
python Run python for this environment. All arguments after '--' will be forwarded directly to python.
update-odoo Update Odoo itself.
pip Run pip for this environment. All arguments after '--' will be forwarded directly to pip.
reinstall Reinstall virtualenv.
install-py-packages Install Python packages
odood venv install-dev-tools
odood venv install-dev-tools: Install Dev Tools
USAGE
$ odood venv install-dev-tools [-h]
FLAGS
-h, --help prints help
odood venv run
odood venv run: Run command in this virtual environment. The command and all arguments must be specified after '--'. For example: 'odood venv run -- ipython'
USAGE
$ odood venv run [-h]
FLAGS
-h, --help prints help
odood venv reinstall-odoo
odood venv reinstall-odoo: Reinstall Odoo to different Odoo version.
USAGE
$ odood venv reinstall-odoo [options]
FLAGS
-h, --help prints help
-b, --backup Backup Odoo before update.
--no-backup Do not take backup of Odoo and venv.
OPTIONS
--venv-py-version value Install specific python version.
--venv-node-version value Install specific node version.
--install-type value Installation type. Accept values: git, archive. Default: archive.
-v, --version value Odoo version to install.
odood venv npm
odood venv npm: Run npm for this environment. All arguments after '--' will be forwarded directly to npm.
USAGE
$ odood venv npm [-h]
FLAGS
-h, --help prints help
odood venv ipython
odood venv ipython: Run ipython in this environment. All arguments after '--' will be forwarded directly to python.
USAGE
$ odood venv ipython [-h]
FLAGS
-h, --help prints help
odood venv python
odood venv python: Run python for this environment. All arguments after '--' will be forwarded directly to python.
USAGE
$ odood venv python [-h]
FLAGS
-h, --help prints help
odood venv update-odoo
odood venv update-odoo: Update Odoo itself.
USAGE
$ odood venv update-odoo [-h] [-b]
FLAGS
-h, --help prints help
-b, --backup Backup Odoo before update.
odood venv pip
odood venv pip: Run pip for this environment. All arguments after '--' will be forwarded directly to pip.
USAGE
$ odood venv pip [-h]
FLAGS
-h, --help prints help
odood venv reinstall
odood venv reinstall: Reinstall virtualenv.
USAGE
$ odood venv reinstall [-h] [--py-version value] [--node-version value]
FLAGS
-h, --help prints help
OPTIONS
--py-version value Install specific python version.
--node-version value Install specific node version.
odood venv install-py-packages
odood venv install-py-packages: Install Python packages
USAGE
$ odood venv install-py-packages [-h] [-r value] [package]
FLAGS
-h, --help prints help
OPTIONS
-r, --requirements value Path to requirements.txt to install python packages from
ARGUMENTS
package Python package specification to install
odood db
odood db: Database management commands
USAGE
$ odood db [-h] command
FLAGS
-h, --help prints help
SUBCOMMANDS
exists Check if database exists.
restore Restore database.
populate Populate database with test data.
drop Drop the odoo database.
backup Backup database.
stun Stun (neutralize) database (disable cron and main servers).
create Create new odoo database.
rename Rename database.
list Show the databases available for this odoo instance.
copy Copy database.
odood db exists
odood db exists: Check if database exists.
USAGE
$ odood db exists [-h] [--q] name
FLAGS
-h, --help prints help
--q, --quiet Suppress output, just return exit code
ARGUMENTS
name Name of database
odood db restore
odood db restore: Restore database.
USAGE
$ odood db restore [-h] [--stun] [--selfish] [-f] [-r] name backup
FLAGS
-h, --help prints help
--stun Stun database (disable cron and mail servers)
--selfish Stop the server while database being restored.
-f, --force Enforce restore, even if backup is not valid.
-r, --recreate Recreate database if it already exists.
ARGUMENTS
name Name of database to restore.
backup Path to backup (or name of backup) to restore database from.
odood db populate
odood db populate: Populate database with test data.
USAGE
$ odood db populate [-h] -d value -m value [-s value] [--repeat value]
FLAGS
-h, --help prints help
OPTIONS
-d, --dbname value Name of database to populate.
-m, --model value Name of model to populate. Could be specified multiple times.
-s, --size value Population size
--repeat value Repeat population N times.
odood db drop
odood db drop: Drop the odoo database.
USAGE
$ odood db drop [-h] name
FLAGS
-h, --help prints help
ARGUMENTS
name Name of database
odood db backup
odood db backup: Backup database.
USAGE
$ odood db backup [-h] [--zip] [--sql] [-a] [-d value] [name]
FLAGS
-h, --help prints help
--zip Make ZIP backup with filestore.
--sql Make SQL-only backup without filestore
-a, --all Backup all databases
OPTIONS
-d, --dest value Destination path for backup. By default will store at project's backup directory.
ARGUMENTS
name Name of database to backup.
odood db stun
odood db stun: Stun (neutralize) database (disable cron and main servers).
USAGE
$ odood db stun [-h] name
FLAGS
-h, --help prints help
ARGUMENTS
name Name of database to stun.
odood db create
odood db create: Create new odoo database.
USAGE
$ odood db create [options] [name]
FLAGS
-h, --help prints help
-d, --demo Load demo data for this db
-r, --recreate Recreate database if it already exists.
--tdb Automatically generate default name of test database
OPTIONS
-l, --lang value Language of database, specified as ISO code of language.
--password value Admin password for this database.
--country value Country for this db.
-i, --install value Install module specified by name.
--install-dir value Install all modules from directory.
--install-file value Install all modules listed in specified file.
ARGUMENTS
name Name of database
odood db rename
odood db rename: Rename database.
USAGE
$ odood db rename [-h] old-name new-name
FLAGS
-h, --help prints help
ARGUMENTS
old-name Name of original database.
new-name New name of database.
odood db list
odood db list: Show the databases available for this odoo instance.
USAGE
$ odood db list [-h]
FLAGS
-h, --help prints help
odood db copy
odood db copy: Copy database.
USAGE
$ odood db copy [-h] old-name new-name
FLAGS
-h, --help prints help
ARGUMENTS
old-name Name of original database.
new-name New name of database.
odood server
odood server: Server management commands.
USAGE
$ odood server [-h] command
FLAGS
-h, --help prints help
SUBCOMMANDS
restart Restart the server running in background.
start Run the server in background.
run Run the server.
log View server logs.
stop Stop the server
browse Open odoo in browser
status Check if server is running
odood server restart
odood server restart: Restart the server running in background.
USAGE
$ odood server restart [-h] [-t value]
FLAGS
-h, --help prints help
OPTIONS
-t, --timeout value Timeout to wait while server starts (in seconds).
odood server start
odood server start: Run the server in background.
USAGE
$ odood server start [-h] [-t value]
FLAGS
-h, --help prints help
OPTIONS
-t, --timeout value Timeout to wait while server starts (in seconds).
odood server run
odood server run: Run the server.
USAGE
$ odood server run [-h] [--ignore-running]
FLAGS
-h, --help prints help
--ignore-running Ingore running Odoo instance. (Do not check/create pidfile).
odood server log
odood server log: View server logs.
USAGE
$ odood server log [-h]
FLAGS
-h, --help prints help
odood server stop
odood server stop: Stop the server
USAGE
$ odood server stop [-h]
FLAGS
-h, --help prints help
odood server browse
odood server browse: Open odoo in browser
USAGE
$ odood server browse [-h]
FLAGS
-h, --help prints help
odood server status
odood server status: Check if server is running
USAGE
$ odood server status [-h]
FLAGS
-h, --help prints help
odood browse
odood browse: Open odoo in browser
USAGE
$ odood browse [-h]
FLAGS
-h, --help prints help
odood status
odood status: Show the project status.
USAGE
$ odood status [-h]
FLAGS
-h, --help prints help
odood start
odood start: Run the server in background.
USAGE
$ odood start [-h] [-t value]
FLAGS
-h, --help prints help
OPTIONS
-t, --timeout value Timeout to wait while server starts (in seconds).
odood repo
odood repo: Manage git repositories.
USAGE
$ odood repo [-h] command
FLAGS
-h, --help prints help
SUBCOMMANDS
fix-series Fix series in manifests of addons in this repo. Set series to project's serie
add Add git repository to Odood project.
fix-version-conflict Fix version conflicts in manifests of addons in this repo.
do-forward-port [Experimental] Do forwardport changes from older branch.
check-versions Check changed addons has updated versions.
bump-versions Bump versions for modules that have changes (comparably to stable branch (17.0, 18.0, ...)).
migrate-addons Migrate code of addons that has older odoo serie to serie of this project.
odood repo fix-series
odood repo fix-series: Fix series in manifests of addons in this repo. Set series to project's serie
USAGE
$ odood repo fix-series [-h] [path]
FLAGS
-h, --help prints help
ARGUMENTS
path Path to repository to fix conflicts in.
odood repo add
odood repo add: Add git repository to Odood project.
USAGE
$ odood repo add [options] repo
FLAGS
-h, --help prints help
--oca Add Odoo Community Association (OCA) repository. If set, then 'repo' argument could be specified as name of repo under 'https://github.com/OCA' organuzation.
--github Add github repository. If set, then 'repo' argument could be specified as 'owner/name' that will be converted to 'https://github.com/owner/name'.
--single-branch Clone repository wihth --single-branch options. This could significantly reduce size of data to be downloaded and increase performance.
-r, --recursive If set, then system will automatically fetch recursively dependencies of this repository, specified in odoo_requirements.txt file inside clonned repo.
--ual Update addons list.
OPTIONS
-b, --branch value Branch to clone
ARGUMENTS
repo Repository URL to clone from.
odood repo fix-version-conflict
odood repo fix-version-conflict: Fix version conflicts in manifests of addons in this repo.
USAGE
$ odood repo fix-version-conflict [-h] [path]
FLAGS
-h, --help prints help
ARGUMENTS
path Path to repository to fix conflicts in.
odood repo do-forward-port
odood repo do-forward-port: [Experimental] Do forwardport changes from older branch.
USAGE
$ odood repo do-forward-port [-h] -s value [path]
FLAGS
-h, --help prints help
OPTIONS
-s, --source value Source branch to forwarport changes from
ARGUMENTS
path Path to repository to migrate addons in.
odood repo check-versions
odood repo check-versions: Check changed addons has updated versions.
USAGE
$ odood repo check-versions [-h] [--ignore-translations] [path]
FLAGS
-h, --help prints help
--ignore-translations Ignore translations.
ARGUMENTS
path Path to repository to search for addons to bump versions.
odood repo bump-versions
odood repo bump-versions: Bump versions for modules that have changes (comparably to stable branch (17.0, 18.0, ...)).
USAGE
$ odood repo bump-versions [-h] [--major] [--minor] [--patch] [--ignore-translations] [path]
FLAGS
-h, --help prints help
--major Increase major version for addons.
--minor Increase minor version for addons.
--patch Increase patch version for addons.
--ignore-translations Ignore translations.
ARGUMENTS
path Path to repository to search for addons to bump versions.
odood repo migrate-addons
odood repo migrate-addons: Migrate code of addons that has older odoo serie to serie of this project.
USAGE
$ odood repo migrate-addons [-h] [--commit] [-m value] [path]
FLAGS
-h, --help prints help
--commit Commit changes.
OPTIONS
-m, --module value Name of module to migrate
ARGUMENTS
path Path to repository to migrate addons in.
odood translations
odood translations: Manage translations for this project.
USAGE
$ odood translations [-h] regenerate
FLAGS
-h, --help prints help
SUBCOMMANDS
regenerate Regenerate translations for specified addons.
odood translations regenerate
odood translations regenerate: Regenerate translations for specified addons.
USAGE
$ odood translations regenerate [options] [addon]
FLAGS
-h, --help prints help
--pot-remove-dates Remove dates from generated .pot file.
--pot Generate .pot file for translations.
--pot-update Update translations based on regenerated .pot file.
--missing-only Generate only missing translations.
--no-drop-db Do not drop database after regeneration of translations
OPTIONS
--addon-dir value Directory to search for addons
--addon-dir-r value Directory to recursively search for addons
--lang-file value Combination of lang and file (separated by ':') to generate translations for. For example: uk_UA:uk.
-l, --lang value Language to generate translations for. For example: uk_UA.
ARGUMENTS
addon Specify names of addons as arguments.
odood test
odood test: Run tests for mudles.
USAGE
$ odood test [options] [addon]
FLAGS
-h, --help prints help
-t, --temp-db Create temporary database for tests.
--no-drop-db Do not drop temporary database after test completed.
--isw Ignore warnings that are considered safe.
--simplified-log Display simplified log messages.
--migration Run migration against stable branch.
--coverage Calculate code coverage.
--coverage-report Print coverage report.
--coverage-html Prepare HTML report for coverage.
--coverage-skip-covered Skip covered files in coverage report.
--coverage-ignore-errors Ignore coverage errors.
--no-error-report Do not print error report in the end of the test.
--error-report Print error report in the end of the test.
--warning-report Print warning report in the end of the test.
--no-install-addons Do not install addons before test. Could be useful to speed up local tests.
OPTIONS
--coverage-fail-under value Fail if coverage is less then specified value.
-d, --db value Database to run tests for.
--additional-addon value Specify additional addon to install before test.
--dir value Directory to search for addons to test
--dir-r value Directory to recursively search for addons to test
-f, --file value Read addons names from file (addon names must be separated by new lines)
--skip value Skip (do not run tests) addon specified by name.
--skip-re value Skip (do not run tests) addon specified by regex.
--skip-file value Skip addons listed in specified file (addon names must be separated by new lines)
--migration-start-ref value git reference (branch/commit/tag) to start migration from
--migration-repo value run migration tests for repo specified by path
--populate-model value Name of model to populate. Could be specified multiple times.
--populate-size value Population size.
ARGUMENTS
addon Name of addon to run tests for.
odood assembly
odood assembly: Manage assembly of this project
USAGE
$ odood assembly [-h] command
FLAGS
-h, --help prints help
SUBCOMMANDS
link Link addons from this assembly to custom addons
sync Synchronize assembly with updates from sources.
init Initialize assembly for this project
use Use (attach) assembly located at specified path. Mostly useful in CI flows.
upgrade Upgrade assembly (optionally do backup, pull changes, update addons).
pull Pull updates for this assembly.
status Project assembly status
odood assembly link
odood assembly link: Link addons from this assembly to custom addons
USAGE
$ odood assembly link [-h] [--manifest-requirements] [--ual]
FLAGS
-h, --help prints help
--manifest-requirements Install python dependencies from manifest's external dependencies
--ual Update addons list for all databases
odood assembly sync
odood assembly sync: Synchronize assembly with updates from sources.
USAGE
$ odood assembly sync [options]
FLAGS
-h, --help prints help
--commit Commit changes.
--fail-nothing-to-commit Fail (set exit code = 1) if there is nothing to commit
--push Automatically push changes if needed.
--changelog Generate changelog for assembly.
OPTIONS
--commit-message value Commit message
--commit-user value Name of user to use for commit
--commit-email value Email of user to use for commit
--push-to value Name of branch to push changes to.
odood assembly init
odood assembly init: Initialize assembly for this project
USAGE
$ odood assembly init [-h] [--repo value]
FLAGS
-h, --help prints help
OPTIONS
--repo value Url to git repo with assembly to use for this project.
odood assembly use
odood assembly use: Use (attach) assembly located at specified path. Mostly useful in CI flows.
USAGE
$ odood assembly use [-h] path
FLAGS
-h, --help prints help
ARGUMENTS
path Path to already existing assembly.
odood assembly upgrade
odood assembly upgrade: Upgrade assembly (optionally do backup, pull changes, update addons).
USAGE
$ odood assembly upgrade [-h] [--backup] [--skip-errors]
FLAGS
-h, --help prints help
--backup Do backup of all databases
--skip-errors Continue upgrade next databases if upgrade of db had error.
odood assembly pull
odood assembly pull: Pull updates for this assembly.
USAGE
$ odood assembly pull [-h] [--link]
FLAGS
-h, --help prints help
--link Relink addons in this assembly after pull
odood assembly status
odood assembly status: Project assembly status
USAGE
$ odood assembly status [-h]
FLAGS
-h, --help prints help
odood deploy
odood deploy: Deploy production-ready Odoo.
USAGE
$ odood deploy [options]
FLAGS
-h, --help prints help
--local-postgres Configure local postgresql server (requires PostgreSQL installed)
--proxy-mode Enable proxy-mode in odoo config
--local-nginx Autoconfigure local nginx (requires nginx installed)
--local-nginx-ssl Enable SSL for local nginx
--letsencrypt Enable Let's Encrypt configuration.
--enable-logrotate Enable logrotate for Odoo.
--enable-fail2ban Enable fail2ban for Odoo (requires fail2ban installed).
--log-to-stderr Log to stderr. Useful when running inside docker.
OPTIONS
-v, --odoo-version value Version of Odoo to install
--py-version value Install specific python version.
--node-version value Install specific node version.
--db-host value Database host
--db-port value Database port
--db-user value Database port
--db-password value Database password
--local-nginx-server-name value Servername for nginx config.
--local-nginx-ssl-cert value Path to SSL certificate for local nginx.
--local-nginx-ssl-key value Path to SSL key for local nginx.
--letsencrypt-email value Email for Let's Encrypt account.
--supervisor value What superwisor to use for deployment. One of: odood, init-script, systemd. Default: systemd.
--assembly-repo value Configure Odood to use assembly from this repo. Ensure, you have access to specified repo from this machine.
odood stop
odood stop: Stop the server
USAGE
$ odood stop [-h]
FLAGS
-h, --help prints help
odood lsd
odood lsd: Show the databases available for this odoo instance.
USAGE
$ odood lsd [-h]
FLAGS
-h, --help prints help
odoo_requirements.txt
odoo_requirements.txt file is a text file that describes what repositories have to be installed on Odoo instance. Originally, this format comes from odoo-helper. Odood supports it too.
This file is parsed line by line, and each line must be set of options for odoo-helper fetch command.
Format
Fetch addons form any git repository
-r|--repo <git repository> [-b|--branch <git branch>]
Fetch addons from github repository
--github <github username/reponame> [-b|--branch <git branch>]
Fetch OCA addons from any OCA github repository
--oca <OCA reponame> [-b|--branch <git branch>]
Fetch addons direcly from Odoo Apps
--odoo-app <app name>
Notes
Note odoo_requirements.txt must end with newline symbol.
Examples
--github crnd-inc/generic-addon --module generic_tags -b 12.0
--oca project -m project_description
--odoo-app bureaucrat_helpdesk_lite
Migrate addons code to next Odoo serie
Odood provides ability to migrate addon code to next odoo serie.
This is implemented via odood repo migrate-addons command, that
under the hood uses odoo-module-migrator project.
For example, yo have to take following steps to migrate repo from Odoo 17 to Odoo 18:
- Add repo to Odood project for Odoo 18
- Create new branch in repo 18.0 based on stable 17.0
- Run
odood repo migrate-addonsinside repo with addons to be migrated. - Test that everything works fine, and fix (or disable) things that are broken.
- Commit changes and push changes.
Example
For example, let's assume that we want to migrate repo https://github.com/myname/myrepo from 17.0 to 18.0.
As pre requisite for this task we have to have Odoo 18 development installation installed via Odood.
(if you do not have it, you can install it via command odood init -v 18 -i odoo-18 --db-user=odoo18 --http-port=18069 --create-db-user)
So, let's fetch this repo in Odoo 18 project:
cd odoo-18
odood repo add -b 17.0 git@github.com:myname/myrepo
After this step, we will have repo clonned in repositories/myname/myrepo.
So, let's change directory to that one:
cd repositories/myname/myrepo
Next, we have to create new 18.0 branch:
git checkout -b 18.0
(branch name represnents that version of Odoo, for which addons on this branch expected to work fine)
So, next, we have to run migrator to actually migrate code of addons:
odood repo migrate-addons
Check output of this command, myabe there are some notes or some hits to something that was not migrated automatically. Try to fix it. Test if everything works fine. Fix broken things and commit.
That's all.
Notes
Possibly, it could be better strategy to migrate addons one by one. In this case, you can specify name of addon that you want to migrate:
odood repo migrate-addons -m my_module
(In this case, my_module is name of module to migrate. This option could be specified multiple times).