https://blog.rafnixg.dev/creando-un-entorno-de-desarrollo-para-odoo-140-con-vscode-en-ubuntu-2204
sudo apt install postgresql postgresql-client
sudo -u postgres createuser -s $USER
createdb odoo-dev-13.0
createdb odoo-dev-14.0
createdb odoo-dev-16.0
Debian 10
sudo apt update
sudo apt upgrade
sudo apt install python3-dev python3-pip python3-venv libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev \
libtiff5-dev libjpeg62-turbo-dev libopenjp2-7-dev zlib1g-dev libfreetype6-dev \
liblcms2-dev libwebp-dev libharfbuzz-dev libfribidi-dev libxcb1-dev libpq-dev
Ubuntu 20.04
sudo apt update
sudo apt upgrade
sudo apt install python3-dev python3-pip python3-venv libxml2-dev libxslt1-dev libldap2-dev libsasl2-dev \
libtiff5-dev libjpeg8-dev libopenjp2-7-dev zlib1g-dev libfreetype6-dev \
liblcms2-dev libwebp-dev libharfbuzz-dev libfribidi-dev libxcb1-dev libpq-dev
mkdir -p ~/Odoo/{src,workspaces,instances,instances/odoo-dev-13.0,instances/odoo-dev-14.0,instances/odoo-dev-16.0}
git clone https://github.com/odoo/odoo.git --single-branch --depth 1 --branch 13.0 ~/Odoo/src/13.0
git clone https://github.com/odoo/odoo.git --single-branch --depth 1 --branch 14.0 ~/Odoo/src/14.0
git clone https://github.com/odoo/odoo.git --single-branch --depth 1 --branch 16.0 ~/Odoo/src/16.0
python3 -m venv ~/Odoo/instances/odoo-dev-13.0/venv
python3 -m venv ~/Odoo/instances/odoo-dev-14.0/venv
python3 -m venv ~/Odoo/instances/odoo-dev-16.0/venv
cp ~/Odoo/src/13.0/debian/odoo.conf ~/Odoo/instances/odoo-dev-13.0
sed -i 's/db_user = odoo/db_user = '$USER'/' ~/Odoo/instances/odoo-dev-13.0/odoo.conf
cp ~/Odoo/src/14.0/debian/odoo.conf ~/Odoo/instances/odoo-dev-14.0
sed -i 's/db_user = odoo/db_user = '$USER'/' ~/Odoo/instances/odoo-dev-14.0/odoo.conf
cp ~/Odoo/src/16.0/debian/odoo.conf ~/Odoo/instances/odoo-dev-16.0
sed -i 's/db_user = odoo/db_user = '$USER'/' ~/Odoo/instances/odoo-dev-16.0/odoo.conf
source ~/Odoo/instances/odoo-dev-13.0/venv/bin/activate
pip3 install setuptools wheel inotify psycopg2-binary
pip3 install -r ~/Odoo/src/13.0/requirements.txt
deactivate
source ~/Odoo/instances/odoo-dev-14.0/venv/bin/activate
pip3 install setuptools wheel inotify psycopg2-binary
pip3 install -r ~/Odoo/src/14.0/requirements.txt
deactivate
source ~/Odoo/instances/odoo-dev-16.0/venv/bin/activate
pip3 install setuptools wheel inotify psycopg2-binary
pip3 install -r ~/Odoo/src/16.0/requirements.txt
deactivate
~/Odoo/instances/odoo-dev-13.0/venv/bin/python3 ~/Odoo/src/13.0/odoo-bin -c ~/Odoo/instances/odoo-dev-13.0/odoo.conf -d odoo-dev-13.0 -i base --stop-after-init
~/Odoo/instances/odoo-dev-14.0/venv/bin/python3 ~/Odoo/src/14.0/odoo-bin -c ~/Odoo/instances/odoo-dev-14.0/odoo.conf -d odoo-dev-14.0 -i base --stop-after-init
~/Odoo/instances/odoo-dev-16.0/venv/bin/python3 ~/Odoo/src/16.0/odoo-bin -c ~/Odoo/instances/odoo-dev-16.0/odoo.conf -d odoo-dev-16.0 -i base --stop-after-init
file: ~/Odoo/instances/odoo-dev-13.0/.vscode/launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "odoo-dev-13.0",
"type": "python",
"request": "launch",
"program": "~/Odoo/src/13.0/odoo-bin",
"console": "integratedTerminal",
"args": [
"-c","~/Odoo/instances/odoo-dev-13.0/odoo.conf",
"--limit-time-real", "99999",
"-d", "odoo-dev-13.0"
]
},
{
"name": "odoo-dev-13.0-install-addons",
"type": "python",
"request": "launch",
"program": "~/Odoo/src/13.0/odoo-bin",
"console": "integratedTerminal",
"args": [
"-c","~/Odoo/instances/odoo-dev-13.0/odoo.conf",
"--limit-time-real", "99999",
"-d", "odoo-dev-13.0",
"-i","",
"--stop-after-init"
]
},
{
"name": "odoo-dev-13.0-update-addons",
"type": "python",
"request": "launch",
"program": "~/Odoo/src/13.0/odoo-bin",
"console": "integratedTerminal",
"args": [
"-c","~/Odoo/instances/odoo-dev-13.0/odoo.conf",
"--limit-time-real", "99999",
"-d", "odoo-dev-13.0",
"-u","",
"--stop-after-init"
]
},
{
"name": "odoo-dev-13.0-repl",
"type": "python",
"request": "launch",
"program": "~/Odoo/src/13.0/odoo-bin",
"console": "integratedTerminal",
"args": [
"shell",
"-c","~/Odoo/instances/odoo-dev-13.0/odoo.conf",
"--limit-time-real", "99999",
"--xmlrpc-port","8888",
"--longpolling-port","8899",
"-d", "odoo-dev-13.0",
"--shell-interface", "ipython"
]
}
]
}
file: ~/Odoo/instances/odoo-dev-14.0/.vscode/launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "odoo-dev-14.0",
"type": "python",
"request": "launch",
"program": "~/Odoo/src/14.0/odoo-bin",
"console": "integratedTerminal",
"args": [
"-c","~/Odoo/instances/odoo-dev-14.0/odoo.conf",
"--limit-time-real", "99999",
"-d", "odoo-dev-14.0"
]
},
{
"name": "odoo-dev-14.0-install-addons",
"type": "python",
"request": "launch",
"program": "~/Odoo/src/14.0/odoo-bin",
"console": "integratedTerminal",
"args": [
"-c","~/Odoo/instances/odoo-dev-14.0/odoo.conf",
"--limit-time-real", "99999",
"-d", "odoo-dev-14.0",
"-i","",
"--stop-after-init"
]
},
{
"name": "odoo-dev-14.0-update-addons",
"type": "python",
"request": "launch",
"program": "~/Odoo/src/14.0/odoo-bin",
"console": "integratedTerminal",
"args": [
"-c","~/Odoo/instances/odoo-dev-14.0/odoo.conf",
"--limit-time-real", "99999",
"-d", "odoo-dev-14.0",
"-u","",
"--stop-after-init"
]
},
{
"name": "odoo-dev-14.0-repl",
"type": "python",
"request": "launch",
"program": "~/Odoo/src/14.0/odoo-bin",
"console": "integratedTerminal",
"args": [
"shell",
"-c","~/Odoo/instances/odoo-dev-14.0/odoo.conf",
"--limit-time-real", "99999",
"--xmlrpc-port","8888",
"--longpolling-port","8899",
"-d", "odoo-dev-14.0",
"--shell-interface", "ipython"
]
}
]
}
file: ~/Odoo/instances/odoo-dev-16.0/.vscode/launch.json
{
"version": "0.2.0",
"configurations": [
{
"name": "odoo-dev-16.0",
"type": "python",
"request": "launch",
"program": "~/Odoo/src/16.0/odoo-bin",
"console": "integratedTerminal",
"args": [
"-c","~/Odoo/instances/odoo-dev-16.0/odoo.conf",
"--limit-time-real", "99999",
"-d", "odoo-dev-16.0"
]
},
{
"name": "odoo-dev-16.0-install-addons",
"type": "python",
"request": "launch",
"program": "~/Odoo/src/16.0/odoo-bin",
"console": "integratedTerminal",
"args": [
"-c","~/Odoo/instances/odoo-dev-16.0/odoo.conf",
"--limit-time-real", "99999",
"-d", "odoo-dev-16.0",
"-i","",
"--stop-after-init"
]
},
{
"name": "odoo-dev-16.0-update-addons",
"type": "python",
"request": "launch",
"program": "~/Odoo/src/16.0/odoo-bin",
"console": "integratedTerminal",
"args": [
"-c","~/Odoo/instances/odoo-dev-16.0/odoo.conf",
"--limit-time-real", "99999",
"-d", "odoo-dev-16.0",
"-u","",
"--stop-after-init"
]
},
{
"name": "odoo-dev-16.0-repl",
"type": "python",
"request": "launch",
"program": "~/Odoo/src/16.0/odoo-bin",
"console": "integratedTerminal",
"args": [
"shell",
"-c","~/Odoo/instances/odoo-dev-16.0/odoo.conf",
"--limit-time-real", "99999",
"--xmlrpc-port","8888",
"--longpolling-port","8899",
"-d", "odoo-dev-16.0",
"--shell-interface", "ipython"
]
}
]
}
nice