Call us today!

+91 93422 58771

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

odoo 18 setup

 

With the release of Odoo 18, developers are looking to set up a robust and efficient development environment to build and customize Odoo applications. At Banibro IT Solutions, we aim to provide clear and practical guidance for developers. While many prefer PyCharm, Eclipse is a powerful, open-source IDE that offers extensive functionality for Python development. In this guide, we’ll walk you through the step-by-step process of setting up an Odoo 18 development environment using Eclipse on Ubuntu 24.04 LTS.

Prerequisites for Setting Up Odoo 18 Development

Before proceeding, ensure your system meets the following requirements:

      • Operating System: Ubuntu 24.04 LTS

      • Python Version: 3.11 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 an excellent IDE for Python development, offering powerful debugging and code management features. To install Eclipse on Ubuntu 24.04, follow these steps:

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

    sudo apt-get update
    sudo apt-get upgrade

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

    sudo apt install openjdk-17-jdk

    3. Download Eclipse Installer: Visit 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.11

    Odoo 18 requires Python 3.11 or higher. If your system doesn’t already have Python 3.11, 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.11:

    sudo apt-get install python3.11

    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

    For generating PDF reports, Odoo 18 uses wkhtmltopdf. Follow these steps to install it:

    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 18 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

    Now that the Odoo source code is ready, configure Eclipse to work with your Odoo project:

    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 18”) and set the location to the directory where you cloned the Odoo source code.

            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 odoo18.service

                              Ensure that the service file (odoo18.service) is properly configured and points to the correct Odoo directory and configuration file.

                              Step 10: Running Odoo 18

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

                              http://localhost:8015

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

                              Conclusion

                              By following this guide, you’ll have a fully functional Odoo 18 development environment configured using Eclipse on Ubuntu 24.04. At Banibro IT Solutions, we strive to help developers achieve efficiency and scalability in their Odoo projects. With Eclipse as your development platform, you’re ready to explore the powerful features of Odoo 18 and build world-class business solutions.

                              Ready to get started? Dive into your Odoo development today and unlock your project’s full potential. If you need expert support, reach out to us at Banibro IT Solutions and take your development journey to the next level.