Who we are

About IT Horizon

A boutique technology house engineering enterprise systems with the precision of a luxury maison.

Our story
Odoo Partner

Comprehensive Odoo

End-to-end Odoo 20 Enterprise, implemented, customized, integrated and supported by certified specialists.

Become a client
Odoo apps

Every app, configured for the Gulf

Finance, sales, supply chain, HR, marketing and services apps implemented with the local tax, payroll and language rules each country needs.

All Odoo apps
What we do

Beyond ERP

Strategy, product engineering and customer-experience work that turns systems into advantage.

Talk to us
Sectors

Industry depth

Domain fluency across the sectors that define the GCC economy, and the regulations behind them.

Discuss your sector
Learn · grow · succeed

Insights

Real-world ideas, case studies and sessions to help your business work smarter with Odoo.

Browse the blog
Contact usBook a consultation
Home/Blog/Odoo 19 · Developer guide
Odoo 19 · Developer guide · 7 min read

How to set up an Odoo 19 development environment with PyCharm on Ubuntu

Ubuntu is the natural home for Odoo development: it matches the servers Odoo runs on in production. This guide sets up Odoo 19 with PyCharm, a virtual environment and PDF reports that render correctly.

Why Ubuntu and PyCharm

  • Your development machine behaves like the production server, so fewer surprises at deployment.
  • Python virtual environments, PostgreSQL and system libraries install with the package manager.
  • PyCharm adds code completion for Odoo’s ORM, a real debugger and Git integration.

Step 1: install PyCharm

sudo apt update && sudo apt upgrade -y
sudo snap install pycharm-community --classic

Step 2: install Python 3.12 and build libraries

Ubuntu 24.04 ships Python 3.12. On Ubuntu 22.04, add the deadsnakes repository first:

sudo add-apt-repository ppa:deadsnakes/ppa
sudo apt update
sudo apt install python3.12 python3.12-dev python3.12-venv -y

Then the libraries Odoo’s Python packages compile against:

sudo apt install build-essential libpq-dev libxml2-dev libxslt1-dev \
  zlib1g-dev libffi-dev libssl-dev libjpeg-dev libldap2-dev libsasl2-dev -y

Step 3: install Node.js and the Less compiler

Odoo compiles some interface styles with Less, and right-to-left languages such as Arabic need rtlcss:

sudo apt install -y nodejs npm
sudo npm install -g less less-plugin-clean-css rtlcss

Step 4: install wkhtmltopdf for PDF reports

Odoo renders invoices and reports to PDF with wkhtmltopdf. Use the patched Qt build 0.12.6.1, otherwise headers, footers and page breaks print incorrectly. For Ubuntu 22.04 and 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 ./wkhtmltox_0.12.6.1-3.jammy_amd64.deb -y

Step 5: install PostgreSQL and create the Odoo user

sudo apt install postgresql postgresql-client -y
sudo -u postgres createuser --createdb --no-createrole --no-superuser --pwprompt odoo19

For a local machine you can give the role superuser rights to avoid permission issues when restoring databases. Never do this on a server.

sudo -u postgres psql -c "ALTER USER odoo19 WITH SUPERUSER;"

Step 6: get the Odoo 19 source

sudo apt install git -y
git clone https://github.com/odoo/odoo.git --branch 19.0 --depth 1 odoo19

Step 7: create a virtual environment and install requirements

Open the odoo19 folder in PyCharm and run in its terminal:

python3.12 -m venv venv
source venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt

If psycopg2 fails to build, install the binary package with pip install psycopg2-binary.

Step 8: write odoo.conf

[options]
admin_passwd = admin
db_host = localhost
db_port = 5432
db_user = odoo19
db_password = your_password
addons_path = /home/you/odoo19/addons
logfile = /home/you/odoo19/odoo.log
http_port = 8069

Step 9: add a run configuration

Run → Edit Configurations → + → Python:

  • Script path: odoo-bin
  • Parameters: -c odoo.conf
  • Working directory: the odoo19 folder
  • Interpreter: the venv you 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.
  • Keep separate configuration files for development, testing and production.
  • Start Odoo with --dev=all while you work so Python and view changes reload without restarting.
  • Run your module’s tests with --test-enable -i your_module --stop-after-init before every commit.

Need help with your Odoo project?

Tell us what you are working on. A senior consultant will reply with how we would approach it.