Installing Odoo 17 on Windows

Odoo, the open-source business management software suite, equips businesses with an extensive array of applications to oversee various facets of their operations. Though Odoo is commonly linked with Linux environments, installing it on Windows is a simple procedure, enabling Windows users to harness the capabilities of this robust ERP system.

What are the advantages of using Odoo on Windows?

Although Linux is widely favored for hosting Odoo because of its stability and performance, numerous users find the familiarity of the Windows operating system preferable. Installing Odoo on Windows enables businesses and developers to utilize Odoo's capabilities without requiring a Linux server setup. This adaptability expands Odoo's accessibility to a wider audience, particularly those who primarily rely on Windows for their daily activities.

Installation Guide: Step-by-Step

1. Python installation.

2. PostgreSQL Installation

3. pgAdmin4 and PSQL Configuration.

4. Installation of the C++ kit using Visual Studio Tools.

5. Getting Odoo 17 from Github.

6. Pycharm Installation

7. Configuring Odoo17 Development environment in Pycharm

Step 1: Installing Python

Before proceeding with the installation, verify that Python is not already installed on your system. You can do this by typing the "python --version" command in the command prompt. If Python is installed on your device, it will display a version number, such as "Python 3.xx.x". Otherwise, you will receive an error message stating something like "'python' is not recognized as an internal or external command, operable program, or batch file."

For Odoo 17, Python 3.10 or the latest version is required. If your version is below 3.10 or if Python is not installed on your machine, download Python from the official website: [https://www.python.org/downloads/].


During the installation of the downloaded .exe package, opt for the ‘Custom Installation’ feature and ensure to select the “Add Python 3.12 to PATH” checkbox.


On the optional page, ensure to select all checkboxes and then proceed by clicking "Next".


On the Advanced page, tick the first five checkboxes, and then proceed by clicking "Install".


Step 2: Installing PostgreSQL

To set up PostgreSQL on your system, download and install PostgreSQL directly from the official PostgreSQL website: [https://www.enterprisedb.com/downloads/postgres-postgresql-downloads].


For optimal performance, it's recommended to choose version 13 or later. Click on the download icon under the "Windows x86-64" option. Then proceed with installing the package. During installation, ensure to select all component checkboxes on the "Select Components" page of the installer and set a superuser password on the "Password" page. Keep all other configurations unchanged.



Following the installation of PostgreSQL, you'll encounter a Stack Builder wizard for installing extra components. Within the wizard, choose all the applications listed under the "Database Drivers" category, then proceed to finalize the wizard.


Step 3: Configuring pgAdmin4 and PSQL

During the PostgreSQL installation process, we've already chosen to install pgAdmin4 on the "Select Components" page of the installer, so pgAdmin is already present on your system. Open pgAdmin and navigate to "Servers" in the Object Explorer (tab located on the left side). You'll then be prompted to set up a password for securing pgAdmin. Under the Servers section, expand the Postgres Object, where you'll find the option "Login/Group Roles". Right-click on it to create a new role.


Specify the name of the role in the "general" tab.


Configure the password from the "Definition" tab.


Activate all options available in the "Privileges" tab.


Next, save the changes.

​Step 4: Installing the C++ Kit using Visual Studio Tools

C++ serves as a fundamental language for Windows application development. Visual Studio offers a wide array of tools and libraries, simplifying the process for developers to create Windows desktop applications, services, and components using C++.

Directly download the C++ Build Tools installer from the official website at [https://visualstudio.microsoft.com/visual-cpp-build-tools/].


While installing the installer, ensure to select "Desktop Development with C++" and choose optional components as depicted in the figure.


Afterward, finalize the installation process and reboot your machine to apply the changes.

Step 5: Obtaining Odoo 17 from Github

Downloading Odoo 17 from Github is a straightforward procedure. Simply visit the official GitHub website at [https://github.com/], then search for Odoo and select the first result that appears, as depicted in the image below.


Next, verify that the displayed branch is 17, and click on the “Code” button. Subsequently, you will find the option to download the zip file for Odoo 17.


Unzip the file and store it in a secure location (it's advisable to store it in the home directory).

Step 6: Installing Pycharm

Prerequisites for installing PyCharm:

Minimum Requirement

—--------------- —---------

RAM 4 GB of free RAM

CPU Any modern CPU

Disk space 3.5 GB

Monitor resolution 1024×768

If your system meets these criteria, you can obtain PyCharm Community from the official JetBrains website at [https://www.jetbrains.com/pycharm/download/?section=windows]


Choose installation preferences during the PyCharm installation process, as illustrated in the figure.


Finish the installation process.

Step 7: Setting up the Odoo 17 Development Environment in PyCharm

Now, the last step for configuring Odoo 17, which involves setting up the environment.

To do this, launch PyCharm from your applications and select "Open existing project."


Select the unzipped Odoo 17 folder and click "OK".


To create an odoo.conf file within the directory, right-click on the Odoo-17 folder from the project tab on the left side.


Insert these codes into the file.

[options]
; Is This The Password That Allows Database Operations:
admin_passwd = admin
db_host = localhost
db_port = 5432
db_user = odoo
db_password = odoo
addons_path = /home/user/odoo/addons
xmlrpc_port = 8017

Modify the db_user and db_password as configured in PostgreSQL using pgAdmin. Additionally, update the addons path to the "addons" directory within the extracted odoo-17.0 folder.


Next, we have to configure a Python Interpreter. To do so, navigate to Settings -> Project Settings -> Python Interpreter.


Click on the "Add Interpreter" button within the Python interpreter menu.


Now, select the Interpreter as "System Interpreter," as depicted in the figure, then click OK.


Lastly, we must generate a configuration for running the Odoo17 instance. To do this, choose "Edit Configuration" under the "Current file" option.


Create a new configuration by selecting the Plus icon from the top left panel, then choose Python from the options.


Enter the required details in the configuration as depicted in the figure.

+ Give a name for configuration

+ Select “Script path” as “odoo-bin” file from extracted Odoo-17 (Project Directory)

+ Set Python interpreter only if not already shown.

+ Working Directory choose the extracted project folder

+ Parameters: -c odoo.conf

Then, click on Apply and OK.


Now, you can start your Odoo instance by clicking the play icon next to the configuration option or by pressing Shift+F10 on your keyboard.


If any Python packages are missing from your Python interpreter, PyCharm will indicate the missing packages. You can add them manually to the Python interpreter.

To manually add a package, navigate to the interpreter settings, then click on the + icon above the packages. Paste the name of the missing package into the search bar and install the appropriate one.


Certain packages require installation with alternative packages, which include:

For any missing package, here are the corresponding alternate packages for installation:

* psycopg2  psycopg2-binary

* PIL PIL-Tools 

* dateutil dateutils

* Win32service pypiwin32

Once you've added the missing packages, run the instance again, then open your browser and enter the address "localhost:8017".


You can create a new database by providing your master password as configured in the configuration file, along with entering your email and password.

Calling Functions From XML Files in Odoo 17