What changed since Odoo 19
- Python 3.12 or newer. Odoo 20 will not start on anything older, and warns on versions newer than 3.14. Odoo 19 accepted 3.10.
- PostgreSQL 16 or newer. Odoo 20 warns when it connects to an older server; Odoo 19 asked for 13.
- A choice of PDF engine. wkhtmltopdf is still the default, and Odoo 20 adds an optional engine of its own, Paper Muncher.
- Access rights in one file. Modules declare access in
security/ir.access.csv, one line per group and set of operations with an optional domain, which replaces bothir.model.access.csvand record rules.
Why Ubuntu 24.04
Ubuntu 24.04 LTS ships Python 3.12 and PostgreSQL 16, the minimums for Odoo 20, and Odoo pins its Python dependencies to the versions that release packages. On Ubuntu 22.04 you would need Python 3.12 from the deadsnakes PPA and PostgreSQL 16 from the PostgreSQL apt repository.
Step 1: install PyCharm
sudo apt update && sudo apt upgrade -y
sudo snap install pycharm --classicPyCharm is now one product with a free tier: after the 30-day Pro trial, the free core features are enough for Odoo work.
Step 2: install Python and the build libraries
sudo apt install -y python3 python3-dev python3-venv build-essential \
libpq-dev libxml2-dev libxslt1-dev zlib1g-dev libffi-dev libssl-dev \
libjpeg-dev libldap2-dev libsasl2-devThese let pip build the packages that have no ready-made wheel on Linux, such as python-ldap and psycopg2.
Step 3: install Node.js and rtlcss
Odoo compiles its own styles, but right-to-left languages such as Arabic need the rtlcss tool:
sudo apt install -y nodejs npm
sudo npm install -g rtlcssStep 4: install wkhtmltopdf for PDF reports
wkhtmltopdf is still Odoo 20’s default PDF engine. Use the patched Qt build 0.12.6.1, otherwise headers, footers and page breaks print incorrectly. The Ubuntu 22.04 (jammy) package installs on 24.04:
wget https://github.com/wkhtmltopdf/packaging/releases/download/0.12.6.1-3/wkhtmltox_0.12.6.1-3.jammy_amd64.deb
sudo apt install -y ./wkhtmltox_0.12.6.1-3.jammy_amd64.debOdoo 20 also offers an engine of its own, Paper Muncher, in the optional module base_report_paper_muncher. It needs the paper-muncher program, version 0.6 or later. wkhtmltopdf stays the default unless you switch.
Step 5: install PostgreSQL and create the Odoo user
sudo apt install -y postgresql postgresql-client
sudo -u postgres createuser --createdb --no-createrole --no-superuser --pwprompt odoo20On your own machine you can make the role a superuser to avoid permission errors when restoring databases. Never do this on a server. Odoo refuses to run as the postgres user itself, which is why it gets a role of its own.
sudo -u postgres psql -c "ALTER USER odoo20 WITH SUPERUSER;"Step 6: get the Odoo 20 source
sudo apt install -y git
git clone https://github.com/odoo/odoo.git --branch 20.0 --depth 1 odoo20With an Odoo Enterprise subscription, clone the 20.0 branch of the enterprise repository next to it.
Step 7: create a virtual environment and install the requirements
Open the odoo20 folder in PyCharm and run in its terminal:
python3 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txtIf psycopg2 fails to build, check that libpq-dev and python3-dev from Step 2 are installed, or install psycopg2-binary instead.
Step 8: write odoo.conf
[options]
; master password for the database manager
admin_passwd = change-me
db_host = localhost
db_port = 5432
db_user = odoo20
db_password = your_password
addons_path = /home/you/odoo20/addons
http_port = 8069With Enterprise, list its folder first: addons_path = /home/you/enterprise,/home/you/odoo20/addons. Leave logfile out while you develop, so the log shows in PyCharm’s console.
Step 9: add a run configuration
Run → Edit Configurations → + → Python:
- Script path:
odoo-bin - Parameters:
-c odoo.conf - Working directory: the
odoo20folder - Interpreter: the
venvyou created
Click Run or Debug, then open http://localhost:8069. The database manager confirms the environment works.
Tips from our developers
- Keep your own modules in a separate folder and add it to
addons_path; never edit Odoo’s core addons. - Use Git from the first line of code, one repository per client or product line.
- Start Odoo with
--dev=allwhile you work; withinotifyorwatchdoginstalled in the virtual environment, Python changes reload without a restart. - Run a module’s tests on a throwaway database with
-d test20 -i your_module --test-enable; Odoo stops when they finish. - Declare access in
security/ir.access.csv: a line per group and set of operations, with a domain where you would have written a record rule before.
Building modules for a client and short of hands? Hire an Odoo developer from our team in Kuwait.