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 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 server; use--missing-onlyto skip already-installed onesodood addons update <addon1> [addonN]- update specified odoo addons for all databases available for this server; use--installed-onlyto skip non-installed onesodood 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
Both install and update support --ignore-unfinished-updates to proceed even if the database has pending addon state transitions.
Tests
odood test -t <module>- test single module on temporary databaseodood test -t --dir .- test all installable addons in current directoryodood test -t --migration --dir .- run migration tests for all installable addons in current directoryodood test --coverage-html -t <module>- test single module and create html coverage reportodood test --coverage-html --dir .- test all installable addons and create html coverage report
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.