-
Notifications
You must be signed in to change notification settings - Fork 10
Home
Automate common tasks relative to working with Odoo development databases.
Odev works with subcommands, each having specific effects.
Usage: odev <command> <args>
Arguments in square brackets ([arg]) are optional and can be omitted, arguments in curvy brackets ({arg}) are options to choose from, arguments without brackets (arg) are required.
To see the list of all commands run odev help.
To get help on a specific command and its usage, use odev help <command>.
To avoid inputting credentials every time odev is run, symmetric encryption is used to store them. This is managed with the help of an ssh-agent-loaded key.
Add the following lines to your .bashrc or .zshrc:
/usr/bin/keychain -q --nogui $HOME/.ssh/id_rsa
source $HOME/.keychain/$HOST-shAlternatively, source a script like this in your profile:
#!/bin/sh
env=~/.ssh/agent.env
declare -a keys=("$HOME/.ssh/id_ed25519")
agent_load_env() { test -f "$env" && . "$env" >| /dev/null; }
agent_start() { (umask 077; ssh-agent >| "$env"); . "$env" >| /dev/null 2>&1; }
agent_add_keys() { for i in "${keys[@]}"; do ssh-add "$i" >| /dev/null 2>&1; done; }
agent_load_env
agent_run_state=$(ssh-add -l >| /dev/null 2>&1; echo $?)
if [ ! "$SSH_AUTH_SOCK" ] || [ $agent_run_state = 2 ]; then
agent_start
agent_add_keys
elif [ "$SSH_AUTH_SOCK" ] && [ $agent_run_state = 1 ]; then
agent_add_keys
fi
unset envOdev can be extended with plugins loaded from external GitHub repositories. Enable them with:
odev plugin --enable <plugin>| Name | Description |
|---|---|
| odoo-odev/odev-plugin-ai-translation | Generate Odoo module translations using AI. |
| odoo-ps/odev-plugin-ai-scaffold | Scaffold Odoo modules using AI, based on technical specifications. |
| odoo-odev/odev-plugin-editor-vscode | Interact with VSCode, open debugger sessions and configure workspaces. |
| odoo-odev/odev-plugin-export | Export customizations from a database and convert Studio to code. |
| odoo-odev/odev-plugin-project | Follow-up on projects and setup working directories for new Odoo modules. |
| odoo-ps/odev-plugin-hosted | Interact with PaaS (odoo.sh) and SaaS (Odoo Online) databases. |
| Command | Aliases | Description |
|---|---|---|
| cloc | Count custom lines of code in installed modules. | |
| create | cr |
Create a new Odoo database locally. |
| delete |
remove, rm
|
Remove a local PostgreSQL database. |
| deploy | Deploy a local module to a database. | |
| dump | Backup a database and save its dump file. | |
| info | i |
Fetch and display information about a database. |
| kill | Kill a running Odoo database process. | |
| list | ls |
List local Odoo databases. |
| neutralize |
clean, cl
|
Neutralize a local database for development. |
| quickstart | qs |
Setup a database from an existing starting point. |
| rename | mv |
Rename a local database. |
| restore | Restore a dump file to a database. | |
| run | Run the odoo-bin process for a database. | |
| shell | Run odoo-bin in shell mode. | |
| standardize | std |
Remove customizations from a database. |
| test | tests |
Run unit tests on an empty database. |
| upgrade-code | Run Odoo's native upgrade_code tool. |
| Command | Aliases | Description |
|---|---|---|
| clone | Clone a GitHub repository locally. | |
| fetch | Fetch changes in local Odoo worktrees. | |
| pull | Pull changes in local worktrees. | |
| worktree | wt |
Manage git worktrees. |
| Command | Aliases | Description |
|---|---|---|
| assets | Delete assets files from the database. | |
| pathfinder | pf |
Find the shortest path between two models. |
| Command | Aliases | Description |
|---|---|---|
| config |
conf, cfg
|
Get or set configuration values. |
| help | Display help about commands. | |
| history | Check the history of odev commands run. | |
| plugin | plugins |
Enable and disable plugins. |
| setup | Re-run odev's setup. | |
| update | u |
Force updating Odev and plugins. |
| venv | virtualenv |
Interact with virtual environments. |
| version | v |
Show the current version of odev. |