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 our own senior team.

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 usالعربيةBook a consultation
Home/Blog/Odoo 20 · Developer guide
Odoo 20 · Developer guide · 10 min read

How to set up Odoo 20 in PyCharm on Windows

Odoo runs on Linux in production, but many developers write modules on Windows. This guide takes a clean Windows 10 or 11 machine to a running Odoo 20 instance you can debug in PyCharm, with PDF reports and database backups working.

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 both ir.model.access.csv and record rules.

Step 1: install Python 3.12

Check what you have with python --version in Command Prompt. On Windows, 3.12 is the safest choice because it is the version Odoo pins its dependencies against. Download the 64-bit Windows installer from python.org.

  • Run the installer and choose Customize installation.
  • Tick Add python.exe to PATH.
  • On Optional Features keep everything selected.
  • On Advanced Options tick Install Python 3.12 for all users and Add Python to environment variables, then click Install.

Step 2: install PostgreSQL 16 or newer

Download the PostgreSQL installer for Windows x86-64, version 16 or later, from postgresql.org and run it.

  • Keep pgAdmin 4 and the Command Line Tools ticked on Select Components.
  • Set a password for the postgres superuser and keep it somewhere safe.
  • Leave the port at 5432 and the other settings at their defaults.
  • You can skip Stack Builder at the end: Odoo needs nothing from it.

Step 3: create the Odoo database user

  1. Open pgAdmin 4 and set a master password when asked.
  2. Expand Servers → your PostgreSQL instance → Login/Group Roles.
  3. Right-click Login/Group Roles → Create → Login/Group Role.
  4. On General, name the role odoo20.
  5. On Definition, set a password.
  6. On Privileges, switch on Can login? and Create databases?, then save.

On your own machine you can also switch on Superuser? to avoid permission errors when restoring backups. Never do that on a server. Odoo refuses to run as the postgres user itself, which is why it gets a role of its own.

Step 4: install the C++ build tools

Most of Odoo’s Python dependencies install from ready-made wheels, but a few still compile native code on Windows. Install Build Tools for Visual Studio from Microsoft with the Desktop development with C++ workload, then restart Windows.

Step 5: install wkhtmltopdf for PDF reports

Odoo 20 prints invoices and reports with wkhtmltopdf by default. Download the Windows 64-bit installer of version 0.12.6 from wkhtmltopdf.org and install it with the defaults, into C:\Program Files\wkhtmltopdf. You will point Odoo at it in Step 8.

Step 6: download the Odoo 20 source

Open the official repository at github.com/odoo/odoo, switch the branch to 20.0, then Code → Download ZIP, and extract it to a folder such as C:\Users\you\odoo-20.0. With Git installed, clone it instead:

git clone https://github.com/odoo/odoo.git --branch 20.0 --depth 1 odoo-20.0

With an Odoo Enterprise subscription, get the 20.0 branch of the enterprise repository the same way and keep it next to it, for example in C:\Users\you\enterprise.

Step 7: install PyCharm

ComponentRequirement
CPUx86-64 or ARM64, 4 cores
RAM8 GB in total, 3 GB free for the IDE
Disk10 GB
Display1280 × 720
Windows10 or 11

Download PyCharm from jetbrains.com and install it with the default options. PyCharm is now one product with a free tier: after the 30-day Pro trial, the free core features are enough for Odoo development.

Step 8: configure the project in PyCharm

Open PyCharm, choose Open, and select the Odoo folder. In its root, create a file named 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 = C:\Users\you\odoo-20.0\addons
; wkhtmltopdf for PDF reports, pg_dump and psql for backups
bin_path = C:\Program Files\wkhtmltopdf\bin
pg_path = C:\Program Files\PostgreSQL\16\bin
http_port = 8020

Use the role and password from Step 3, and change the PostgreSQL folder if you installed another version. With Enterprise, list its folder first: addons_path = C:\Users\you\enterprise,C:\Users\you\odoo-20.0\addons. Port 8020 keeps it apart from an Odoo 19 instance on another port.

Next, set the project interpreter (Settings → Project → Python Interpreter → Add Interpreter) to a new virtual environment based on Python 3.12, then install the requirements from PyCharm’s terminal:

pip install -r requirements.txt

Finally, create a run configuration: Run → Edit Configurations → + → Python, and fill in:

  • Name: Odoo 20
  • Script path: the odoo-bin file in the Odoo folder
  • Parameters: -c odoo.conf
  • Working directory: the Odoo folder
  • Interpreter: the virtual environment you set above

Step 9: run Odoo and create a database

Click Run. When the log shows the server is listening, open http://localhost:8020. On the database screen enter the master password from admin_passwd, a database name, the admin email and password, and a language and country. Untick demo data if you want a clean database, then click Create database.

Tips from our developers

  • Keep your own modules in a separate folder and add it to addons_path; never edit Odoo’s core addons.
  • Install watchdog in the virtual environment and start Odoo with --dev=all, so Python, view and template 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.
  • Back up and restore databases from http://localhost:8020/web/database/manager. That is what pg_path is for.

Building modules for a client and short of hands? Hire an Odoo developer from our team in Kuwait.

Need help with your Odoo project?

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