Call us today!

+91 93422 58771

How to install Odoo 17 on Ubuntu 24.04, a step-by-step guide

odoo-17-setup

 

Setting up a development environment is a crucial first step for Odoo 17 developers. At Banibro IT Solutions, we believe in empowering developers with the right tools to streamline their workflow. While many developers prefer PyCharm, Eclipse offers a robust, flexible, and open-source alternative for managing Odoo development projects. In this guide, we’ll walk you through a step-by-step process to set up an Odoo 17 development environment using Eclipse on Ubuntu 20.04.

Prerequisites for Setting Up Odoo 17 Development

Before we start, ensure your system meets the following requirements:

    • Operating System: Ubuntu 20.04 LTS

    • Python Version: 3.10 or higher

    • Database: PostgreSQL

    • IDE: Eclipse IDE for Enterprise Java and Web Developers

Having these prerequisites ensures a smooth setup process and avoids compatibility issues during development.

Step 1: Install Eclipse IDE

Eclipse is a popular, open-source integrated development environment (IDE) that supports multiple programming languages, including Python. To install Eclipse on Ubuntu, follow these steps:

1. Update the System: Open the terminal and run:

 

apt-get update sudo apt-get upgrade

2. Install Java (Required for Eclipse): Eclipse requires Java to run. Install OpenJDK 11 with

sudo apt install openjdk-11-jdk

3. Download Eclipse Installer: Navigate to the official Eclipse download page and download the installer for “Eclipse IDE for Enterprise Java and Web Developers.

4. Install Eclipse: After downloading, extract the .tar.gz file:

tar -xvf eclipse-inst-jre-linux64.tar.gz cd eclipse-installer ./eclipse-inst

Follow the installation wizard and select the IDE package for Java and Web Developers.

5. Launch Eclipse: Once installed, launch Eclipse from the applications menu or terminal:

eclipse

Step 2: Install Python 3.10

Odoo 17 requires Python 3.10 or higher. If your system doesn’t already have Python 3.10, follow these steps to install it:

1. Add the Deadsnakes PPA:

sudo add-apt-repository ppa:deadsnakes/ppa sudo apt-get update

2. Install Python 3.10:

sudo apt-get install python3.10

3. Install Required Python Libraries: Odoo requires additional Python dependencies. Install them with:

sudo apt-get install python3-dev build-essential libjpeg-dev libpq-dev libjpeg8-dev \ libxml2-dev libssl-dev libffi-dev libmysqlclient-dev libxslt1-dev zlib1g-dev \ libsasl2-dev libldap2-dev liblcms2-dev

Step 3: Install Web Dependencies

Odoo 18’s web interface relies on specific web dependencies. To install them, run the following commands:

sudo apt-get install -y npm sudo ln -s /usr/bin/nodejs /usr/bin/node sudo npm install -g less less-plugin-clean-css sudo apt-get install -y node-less

These dependencies are essential for rendering Odoo’s web-based interface.

Step 4: Install wkhtmltopdf

Odoo uses wkhtmltopdf for generating PDF reports. To install it, follow these steps:

1. Download the wkhtmltopdf package:

sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.6/wkhtmltox_0.12.6-1.bionic_amd64.deb

2. Install the package:

sudo dpkg -i wkhtmltox_0.12.6-1.bionic_amd64.deb sudo apt install -f

wkhtmltopdf is now ready for use in Odoo 18.

Step 5: Install PostgreSQL

Odoo relies on PostgreSQL as its database server. To install PostgreSQL, run:

sudo apt install postgresql postgresql-client

Step 6: Configure PostgreSQL for Odoo

Once PostgreSQL is installed, create a user and database for Odoo:

1. Switch to PostgreSQL User:

sudo su - postgres

2. Create a New PostgreSQL User:

createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo18

3. Grant Superuser Permissions:

psql ALTER USER odoo18 WITH SUPERUSER; \q exit

Step 7: Download Odoo 17 Source Code

Clone the Odoo 18 source code from the official repository using Git:

git clone https://www.odoo.com/git/odoo.git --branch 18.0 --depth=1

This will download the latest version of Odoo 18 into your working directory.

Step 8: Configure Eclipse for Odoo Development

    1. Install Python Plugin for Eclipse:

        • Open Eclipse and go to Help > Eclipse Marketplace.
        •  
        • Search for PyDev and install it. PyDev adds Python development capabilities to Eclipse.

        • 2. Create a New Eclipse Project:

            • Go to File > New > PyDev Project.

            • Name the project (e.g., “Odoo 17”) and set the location to the directory where you cloned the Odoo source code.

  1. 3. Set Up a Virtual Environment:

      • Open a terminal in your project directory and create a virtual environment:

python3.11 -m venv odoo_env

Activate the virtual environment:

source odoo_env/bin/activate

Install the required Python dependencies for Odoo:

pip install -r requirements.txt

4. Configure Debugging in Eclipse:

    • Go to Run > Debug Configurations.

    • Create a new Python Run Configuration.

    • Set the Script to the odoo-bin file in your Odoo directory.

    • Add the following parameters:

-c /path/to/your/odoo.conf

    • Set the Working Directory to your Odoo project folder.

    • Use the Python interpreter from your virtual environment.

Step 9: Start the Odoo Server

To start the Odoo server, use the following command:

sudo systemctl start odoo17.service

This command will start the Odoo service. Ensure that the service file (odoo17.service) is properly configured and points to the correct Odoo directory and configuration file.

Step 10: Running Odoo 17

Once the server is started, open your browser and navigate to:

http://localhost:8015

You should see the Odoo 17 interface, ready for development and customization.

Conclusion

By following this guide, you’ll have a fully functional Odoo 17 development environment configured using Eclipse on Ubuntu 20.04. At Banibro IT Solutions, we prioritize efficiency and flexibility, and Eclipse provides an excellent platform for managing Odoo projects. With this setup, you’re ready to dive into Odoo development and build powerful, scalable business solutions.

Ready to streamline your Odoo 17 development? Follow this guide and set up your environment today! If you need expert assistance or want to explore Odoo solutions for your business, Banibro IT Solutions is here to help.

💡 Get in touch with us for expert Odoo implementation, customization, and support!
📩 Contact us now to take your Odoo projects to the next level!