Odoo Development Install Scripts
These scripts are based on the install script from Yenthe Van Ginneken (Odoo Install Script). The original script is splitted and modified to make room for installing Odoo in virtual environments for development.
The first script is to install machine wide requirements and the others are to install Odoo itself.
wget https://raw.githubusercontent.com/yonitjio/odoo-dev-install-scripts/main/odoo_install_req.sh
chmod +x odoo_install_req.sh
sudo ./odoo_install_req.sh
wget https://raw.githubusercontent.com/yonitjio/odoo-dev-install-scripts/main/odoo_install_dev_community.sh
chmod +x odoo_install_dev_community.sh
./odoo_install_dev_community.sh
wget https://raw.githubusercontent.com/yonitjio/odoo-dev-install-scripts/main/odoo_install_dev_enterprise.sh
chmod +x odoo_install_dev_enterprise.sh
./odoo_install_dev_enterprise.sh
Some of the original parameters are removed as they are not needed (my opinion).
You can modify them the same way the original scripts.
Up on successful installation, Odoo source code will be installed in current user home directory. E.g:
- Community edition
/home/<current_user>/odoo-dev/17.0.community
- Enterprise edition
/home/<current_user>/odoo-dev/17.0.enterprise
You can use the following as your launch.json
file:
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Odoo",
"type": "debugpy",
"request": "launch",
"program": "${workspaceRoot}/odoo/odoo-bin",
"args": ["-c", "${workspaceFolder}/odoo.conf"],
"gevent": false,
"envFile": "${workspaceFolder}/debug.env",
"console": "integratedTerminal",
"justMyCode": false,
"python": "${workspaceRoot}/.venv/bin/python3"
}
]
}
- Before running
odoo_install_req.sh
, edit the file and change line 9 fromOE_USER=$(logname)
toOE_USER=${SUDO_USER:-${USER}}
. - The script may fail to create user for PostgreSQL, if this happens you need to create the user manually:
- Make sure the postgresql service is running:
sudo service postgresql start
- Create new user
sudo su - postgres -c "createuser -s <CHANGE_THIS_TO_YOUR_USER_NAME>" 2> /dev/null || true
- Make sure the postgresql service is running:
- If you're using VS Code, you will need to install VS Code Remote Development Extension Pack or at the very least VS Code WSL Extension.
- Postgresql may not automatically starts, to start it manually run this on your terminal:
sudo service postgresql start