Skip to content

Mastering Your Odoo 19 Windows Install: The Ultimate Step-by-Step Guide

keyphrase odoo 19 windows install
https://www.youtube.com/watch?v=b6HEu5WQ2s8

Welcome to the ultimate guide for a successful Odoo 19 Windows Install! If you’re looking to set up Odoo 19, the latest iteration of this powerful open-source ERP system, on your Windows machine, you’ve come to the right place. Odoo offers an incredible suite of business management tools, from CRM and sales to manufacturing and accounting, and getting it running smoothly is your first step towards unlocking its full potential.

While setting up an enterprise-grade application like Odoo might seem daunting, especially on a Windows environment, we’re here to make the process straightforward and manageable. This tutorial will walk you through every critical component, from installing prerequisites like Python and PostgreSQL to configuring your development environment in Visual Studio Code. By the end, you’ll have a fully functional Odoo 19 instance ready for development, customization, and exploration.

This guide is inspired by and expands upon the excellent video tutorial by Odoic, which you can find here: https://www.youtube.com/watch?v=b6HEu5WQ2s8. We’ll cover everything you need to know, providing detailed explanations and practical tips to ensure your Odoo 19 Windows Install is seamless.

Why Odoo 19 on Windows?

Odoo is a versatile business management software, and running it on Windows provides a familiar environment for many users and developers. It’s perfect for testing, learning, or even for smaller deployments. Odoo 19 brings exciting new features and improvements, making it an even more compelling choice for businesses looking to streamline operations. Getting a proper Odoo 19 Windows Install is crucial for anyone aiming to leverage these advancements.

Before You Begin: Important Notes

  • System Requirements: A Windows machine (Windows 10 or 11 recommended) with a stable internet connection.
  • Stability Recommendation: While newer versions of Python and PostgreSQL are available, for optimal stability with Odoo 19 at this time, we strongly recommend using Python 3.12 and PostgreSQL 15. This tutorial will guide you through installing these specific versions.

Let’s dive into the installation process!

Step 1: Install Python 3.12 – The Foundation for Odoo

Python is the programming language Odoo is built upon, making it the first essential component for your Odoo 19 Windows Install. Installing the correct version is crucial for compatibility.

  1. Download Python 3.12:

    • Navigate to the official Python downloads page for Windows: https://www.python.org/downloads/windows/
    • Scroll down and locate Python 3.12.x (e.g., Python 3.12.1). Download the appropriate installer for your system (usually “Windows installer (64-bit)”).
  2. Run the Installer:

    • Execute the downloaded .exe file.
    • Crucially, on the first screen, ensure you check the box that says “Add Python.exe to PATH”. This step is vital as it allows you to run Python commands from any directory in your command prompt, simplifying later steps.
    • Click “Install Now” to proceed with the default installation.
    • Once the installation is complete, you might see an option to “Disable path length limit.” It’s generally a good idea to click this, especially for development environments, to prevent potential issues with long file paths.
  3. Verification:

    • Open a new Command Prompt (search for cmd in the Start Menu).
    • Type python --version and press Enter. You should see Python 3.12.x displayed.
    • Type pip --version and press Enter. You should see the pip version, indicating that Python’s package installer is also correctly set up.

Step 2: Install PostgreSQL 15 – Odoo’s Database Engine

Odoo relies on PostgreSQL as its database system to store all your business data. A robust PostgreSQL setup is paramount for your Odoo 19 Windows Install.

  1. Download PostgreSQL 15:

    • Visit the PostgreSQL downloads page for Windows: https://www.postgresql.org/download/windows/
    • Click on “Download the installer” and then select the installer for PostgreSQL 15 (e.g., “PostgreSQL 15.x for Windows x64”).
  2. Run the Installer:

    • Double-click the downloaded installer.
    • Proceed through the wizard, accepting the default installation directory unless you have a specific reason to change it.
    • Set a Password: You will be prompted to set a password for the postgres superuser. Remember this password! It’s essential for managing your databases.
    • Port: Keep the default port (5432).
    • Locale: Leave the default locale.
    • Stack Builder: Towards the end, uncheck the “Launch Stack Builder” option unless you specifically need it for other tools.
    • Allow the installation to complete. This might take a few minutes.

Step 3: Install Git – Version Control for Odoo Development

Git is a distributed version control system that’s essential for cloning the Odoo 19 repository and managing your code.

  1. Download Git:

    • Go to the official Git downloads page: https://git-scm.com/downloads
    • Download the installer for Windows (usually “64-bit Git for Windows Setup”).
  2. Run the Installer:

    • Execute the downloaded file.
    • For most users, accepting the default options throughout the installation wizard is perfectly fine. Git is well-configured out-of-the-box.

Step 4: Install WKHTMLtoPDF – Odoo’s PDF Reporting Tool

Odoo uses WKHTMLtoPDF to convert HTML content into PDF documents, which is crucial for generating invoices, reports, and other printable documents directly from the system.

  1. Download WKHTMLtoPDF:

  2. Run the Installer:

    • Run the installer, accepting the default settings. This will correctly add WKHTMLtoPDF to your system’s PATH, allowing Odoo to find it automatically.

Step 5: Install Visual Studio Code – Your Odoo Development Hub

Visual Studio Code (VS Code) is a highly popular, lightweight, yet powerful code editor. It offers excellent support for Python and JavaScript development, making it an ideal choice for customizing your Odoo 19 Windows Install.

  1. Download VS Code:

  2. Run the Installer:

    • Execute the installer. Accept the license agreement.
    • During the “Select Additional Tasks” step, it’s highly recommended to check “Add ‘Open with Code’ action to Windows Explorer file context menu” and “Add ‘Open with Code’ action to Windows Explorer directory context menu” for convenience.
    • Complete the installation.

Step 6: Create a Virtual Environment for Odoo 19

A virtual environment is a best practice in Python development. It isolates your Odoo project’s dependencies from other Python projects and your system’s global Python installation, preventing conflicts.

  1. Create an Odoo Directory:

    • Open a Command Prompt.
    • Create a dedicated directory for your Odoo project. For instance:
    mkdir C:\Odoo19
    cd C:\Odoo19
    
  2. Create the Virtual Environment:

    • While inside C:\Odoo19, execute the command:
    python -m venv venv
    

    This creates a new folder named venv containing a minimal Python installation and pip, isolated from your main Python environment.

Step 7: Create a PostgreSQL User for Odoo

For security and management, it’s best to create a dedicated PostgreSQL user for your Odoo instance instead of using the postgres superuser directly.

  1. Open SQL Shell (psql):

    • Search for “SQL Shell (psql)” in your Windows Start Menu and open it.
    • Press Enter for Server (localhost), Database (postgres), Port (5432), and Username (postgres).
    • Enter the postgres superuser password you set during PostgreSQL installation.
  2. Execute SQL Commands:

    • Once logged in, execute the following commands to create a new user named odoo and grant it superuser privileges (which Odoo requires for database creation/management):
    CREATE USER odoo WITH PASSWORD 'your_odoo_password';
    ALTER ROLE odoo WITH SUPERUSER;
    

    Important: Replace 'your_odoo_password' with a strong, unique password for your Odoo database user. Remember this password!

    • Type \q and press Enter to exit the SQL Shell.

Step 8: Clone the Odoo 19 Repository

Now it’s time to get the Odoo 19 source code onto your system. Git will handle this efficiently.

  1. Navigate to your Odoo Directory:

    • In your Command Prompt, ensure you are in C:\Odoo19.
  2. Clone the Repository:

    • Execute the following Git command:
    git clone --single-branch --branch 19 https://github.com/odoo/odoo odoo19
    

    This command clones only the 19 branch of the official Odoo repository into a new folder named odoo19 within your C:\Odoo19 directory. This step directly prepares the Odoo source code for your Odoo 19 Windows Install.

Step 9: Activate Virtual Environment and Install Odoo Dependencies

With the Odoo source code available, we need to install all the Python libraries and packages it relies on.

  1. Activate the Virtual Environment:

    • In your Command Prompt (still in C:\Odoo19), activate the virtual environment:
    venv\Scripts\activate
    

    You’ll see (venv) prefix your command prompt, indicating that it’s active.

  2. Navigate to Odoo 19 Directory:

    • Change into the newly cloned Odoo 19 directory:
    cd odoo19
    
  3. Install Dependencies:

    • Run the command to install all required Python packages from the requirements.txt file:
    pip install -r requirements.txt
    

    This process will download and install numerous packages. It might take several minutes, depending on your internet connection. This is a critical step for a successful Odoo 19 Windows Install.

Step 10: Configure Odoo in Visual Studio Code

VS Code will be your primary interface for developing and running Odoo. Setting it up correctly enhances your workflow.

  1. Open Odoo in VS Code:

    • Open Visual Studio Code.
    • Go to File -> Open Folder...
    • Navigate to and select the C:\Odoo19\odoo19 folder. Click “Select Folder.”
  2. Set Up VS Code Terminal:

    • Open a new terminal in VS Code: Terminal -> New Terminal.
    • VS Code might default to PowerShell. For consistency and ease of activation, change it to Command Prompt. Click the dropdown arrow next to the + sign in the terminal window, then select Select Default Profile and choose Command Prompt. Close and reopen the terminal.
    • Activate your virtual environment in the VS Code terminal:
    venv\Scripts\activate
    
  3. Create Odoo Configuration File (odoo.conf):

    • In the VS Code terminal, with your venv active, run:
    python odoo-bin --save --config odoo.conf
    

    This command generates a basic odoo.conf file in your C:\Odoo19\odoo19 directory. This file holds crucial settings for your Odoo 19 Windows Install.

    • Open the odoo.conf file in VS Code. You’ll find it in the Explorer panel.
    • Modify the following parameters under the [options] section:
    [options]
    ; Your Odoo database connection details
    db_host = localhost
    db_port = 5432
    db_user = odoo
    db_password = your_odoo_password
    ; Specify the path to Odoo's default add-ons
    addons_path = C:\Odoo19\odoo19\addons
    
    • Important: Replace your_odoo_password with the password you set for the odoo PostgreSQL user in Step 7.
    • Ensure db_host is localhost and db_port is 5432 (unless you changed it during PostgreSQL installation).
    • The addons_path directs Odoo to where its standard modules are located.
    • Save the odoo.conf file.
  4. Create launch.json for Debugging:

    • Go to the “Run and Debug” view in VS Code (you can click the run icon on the left sidebar or press Ctrl+Shift+D).
    • Click the “create a launch.json file” link.
    • Select “Python Debugger” and then “Python File” (the first option).
    • VS Code will create a launch.json file in a .vscode folder. Replace its entire content with the following configuration:
    {
        "version": "0.2.0",
        "configurations": [
            {
                "name": "Odoo 19 Debug",
                "type": "python",
                "request": "launch",
                "program": "${workspaceFolder}/odoo-bin",
                "args": [
                    "--config",
                    "${workspaceFolder}/odoo.conf"
                    // Uncomment and add other args if needed, e.g., for specific ports
                    // "--xmlrpc-port", "8081",
                    // "--http-port", "8080"
                ],
                "console": "integratedTerminal",
                "justMyCode": false, // Essential for debugging Odoo source code
                "env": {
                    "PATH": "${workspaceFolder}/venv/Scripts;${env:PATH}"
                }
            }
        ]
    }
    
    • The program points to odoo-bin, Odoo’s executable.
    • args tells Odoo to use our odoo.conf file.
    • justMyCode: false is crucial for allowing you to step into Odoo’s core code during debugging, which is invaluable for development.
    • The env block ensures the virtual environment’s scripts directory is prioritized in the PATH when Odoo is launched, helping with dependencies like wkhtmltopdf.
    • Save the launch.json file.

Step 11: Run Your Odoo 19 Instance

You’re almost there! With all components installed and configured, it’s time to launch Odoo.

  1. Start Odoo:

    • In VS Code, return to the “Run and Debug” view (Ctrl+Shift+D).
    • From the dropdown at the top, select the “Odoo 19 Debug” configuration.
    • Click the green “Start Debugging” play button.
    • You’ll see Odoo start up in the VS Code terminal. If everything is configured correctly, Odoo will launch a web server, and your default browser will automatically open to http://localhost:8069 (or the port you configured).
    • For a deeper dive into Odoo’s capabilities, check out our Introduction to Odoo blog post for beginners.

Step 12: Create the Odoo Database

The first time you run Odoo, it will present you with a database creation screen.

  1. Configure Database:

    • Master Password: This is the master password Odoo uses to allow creation, deletion, or restoration of databases. You can find this in your odoo.conf file (look for admin_password = ...). Copy and paste it here.
    • Database Name: Enter a unique name for your database (e.g., my_odoo19_db).
    • Email & Password: Set up the credentials for your Odoo administrator user.
    • Language & Country: Choose your preferences.
    • Load Demo Data: Check this box if you want Odoo to pre-populate your database with sample data. This is highly recommended for learning and exploration.
    • Click “Create database.” This process will take several minutes as Odoo initializes the database and installs its base modules.
  2. Access Odoo:

    • Once the database creation is complete, Odoo will log you in, and you’ll see the main Odoo dashboard with its various applications.

Step 13: Configure Custom Addons Path (Optional but Recommended)

For any custom development or third-party modules, it’s best practice to keep them separate from Odoo’s core addons directory.

  1. Create Custom Addons Folder:

    • In your C:\Odoo19 directory, create a new folder, for example, custom_addons.
    mkdir C:\Odoo19\custom_addons
    
  2. Edit odoo.conf:

    • Open odoo.conf in VS Code.
    • Locate the addons_path parameter and modify it to include your new custom addons folder, separated by a comma:
    addons_path = C:\Odoo19\odoo19\addons,C:\Odoo19\custom_addons
    
    • Save the file.
  3. Restart Odoo:

    • Stop the Odoo server in VS Code (by clicking the red square in the “Run and Debug” view or Ctrl+C in the terminal).
    • Start Odoo again using the “Odoo 19 Debug” configuration.
    • Any custom modules placed in C:\Odoo19\custom_addons will now be recognized by your Odoo 19 Windows Install.

Troubleshooting Common Issues

  • Pip/Python not found: Ensure “Add Python to PATH” was checked during Python installation. If not, revisit Step 7 or manually add Python to your environment variables.
  • PostgreSQL password issues: Double-check the password for the odoo user in odoo.conf matches what you set in PostgreSQL.
  • Database connection errors: Verify PostgreSQL is running (check “Services” in Windows, look for PostgreSQL 15). Confirm db_host and db_port in odoo.conf are correct.
  • WKHTMLtoPDF errors: Ensure WKHTMLtoPDF was installed correctly and is accessible via your system’s PATH. Restarting Odoo after installation often helps.
  • Virtual environment not active: Always remember to run venv\Scripts\activate in each new terminal session before running Odoo-related commands.

Conclusion: Your Odoo 19 Windows Install is Complete!

Congratulations! You’ve successfully completed a full Odoo 19 Windows Install, setting up Python 3.12, PostgreSQL 15, Git, WKHTMLtoPDF, and Visual Studio Code. Your Odoo development environment is now robust and ready for action. You can debug Odoo’s core modules, develop your own custom applications, and explore the myriad features Odoo 19 has to offer.

This comprehensive setup provides the perfect foundation for building tailored solutions, integrating with other systems, and optimizing your business processes with Odoo. Whether you’re a developer, a consultant, or a business owner eager to explore Odoo, this guide has equipped you with the necessary steps to get started.

If this tutorial was helpful for your Odoo 19 Windows Install, please share it with others who might benefit! Leave a comment below if you have any questions or tips to add. Stay tuned for more Odoo content, tutorials, and insights!


Discover more from teguhteja.id

Subscribe to get the latest posts sent to your email.

Leave a Reply

WP Twitter Auto Publish Powered By : XYZScripts.com