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.
Before proceeding, ensure your system meets the following requirements:
Having these prerequisites ensures a smooth setup process and avoids compatibility issues during development.
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
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
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.
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.
Odoo relies on PostgreSQL as its database server. To install PostgreSQL, run:
sudo apt install postgresql postgresql-client
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
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.
Now that the Odoo source code is ready, configure Eclipse to work with your Odoo project:
1. Install Python Plugin for Eclipse:
2. Create a New Eclipse Project:
3. Set Up a Virtual Environment:
python3.11 -m venv odoo_env
source odoo_env/bin/activate
pip install -r requirements.txt
4. Configure Debugging in Eclipse:
odoo-bin
file in your Odoo directory.
-c /path/to/your/odoo.conf
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.
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.
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.