This tutorial walks you through the process of setting up Odoo 17 on Windows using a prebuilt source from Gitee.
1. Clone Odoo Source Code
First, download the Odoo source code from this link. This source is configured to run in a Windows environment.
You can clone the repository using various methods, the easiest is through VSCode.
After cloning, you will see several files in the project directory, though most of them are not necessary for running Odoo:
2. Prepare PostgreSQL Database
To run Odoo, you must have PostgreSQL installed. Everything required to run it on Windows is located in the runtime
folder.
Navigate to the pgsql
directory. The most important folder here is data
:
This folder stores all PostgreSQL settings and data. If you want to start fresh, delete this folder by running the following command:
rd /s/q .\data
Then reinitialize the data folder:
bin\initdb.exe -D .\data -E UTF8
Expected output:
creating directory ./data ... ok
creating subdirectories ... ok
...
success. You can now start the database server using:
"bin\pg_ctl" -D "./data" -l logfile start
You can optionally change the default port to 5439, as shown below:
To start PostgreSQL:
bin\pg_ctl -D .\data -l .\logfile start
Check if it's running:
bin\pg_isready -h localhost -p 5439
If everything is good, you should see:
localhost:5439 - accepting connections
3. Create Database User
To let Odoo connect to PostgreSQL, you need to create a user:
bin\createuser -p 5439 -U admin --createdb --no-createrole --no-superuser --pwprompt odoo
Now you have the odoo/odoo
user ready for your Odoo server to use.
4. Set Up Odoo Server
Open PyCharm and load the odoo17-x64
folder.
You can download PyCharm Community Edition — it's a great tool for Python and Odoo development.
Edit the odoo.conf
file and set your database user credentials:
5. Choose Python Interpreter
Set up the Python interpreter in PyCharm as shown:
After selecting, it should look like this:
6. Create a Run/Debug Config
Set up a configuration to run Odoo:
Click Debug, and you’ll see Odoo start up:
Note: Before you hit Debug, make sure PostgreSQL is running. You can start it again using:
bin\pg_ctl -D .\data -l .\logfile start
? Congratulations! You’ve successfully set up a full Odoo environment on your Windows machine. You can now download and work with different versions of Odoo (15, 16, 17) and build amazing business apps.
Reply