How To Setup Odoo 15 Development Environment

How to Setup Odoo 15 Development Environment Using Pycharm in Ubuntu 22.04

Step : 1 Update the system

sudo apt-get update 
sudo apt-get upgrade

Step : 2 Install Pycharm IDE Community edition

sudo snap install pycharm-community --classic

Step : 3 Install Python-3 and the necessary packages

sudo apt-get install -y python3-pip
sudo apt-get install python-dev 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 : 4 Install Dependencies One by One

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

Step : 5 Install Wkhtmltopdf

sudo wget https://github.com/wkhtmltopdf/wkhtmltopdf/releases/download/0.12.5/wkhtmltox_0.12.5-1.bionic_amd64.deb
sudo dpkg -i wkhtmltox_0.12.5-1.bionic_amd64.deb 
sudo apt install -f

Step : 6 Install PostgreSQL database

sudo apt-get install postgresql

Step : 7 Create a PostgreSQL database

sudo su - postgres
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo15
Alter User to superuser
psql
ALTER USER odoo15 WITH SUPERUSER;
Exit from psql
\q
exit

Step : 8 Install Git

sudo apt-get install git

Step : 9 Clone Odoo 16 (Community Edition)

git clone https://www.github.com/odoo/odoo --depth 1 --branch 15.0 --single-branch odoo15

Step : 10 install required Python packages requirements.txt

cd odoo15
sudo pip3 install -r requirements.txt

Step : 11 Open the Odoo 15 project in Pycharm

Create A New Python Virtual Environment

Step : 12 Create odoo.conf File inside Odoo15 Directory

Paste below details in odoo.conf file
[options]
; Is This The Password That Allows Database Operations:
admin_passwd = admin
db_host = localhost
db_port = 5432
db_user = odoo15
db_password = False (Put your password which you create earlier)
addons_path = /home/user/odoo/addons
xmlrpc_port = 8035

Step : 13 Add Python Interpreter

Go to File -> Settings -> Project: odoo15 -> Python Interpreter
  1. Click on Add Interpreter
  2. Select python 3.8
  3. Now go to edit the configuration and follow below screenshot 
Pycharm edit config

After the configuration of Odoo is completed. click to run button for tun current project.

Step : 14 Open your Browser localhost:8035

This will take you to the Odoo database page. Just Create a database with an admin password which you include in odoo.conf file admin_password=Master Password.

Leave a Comment

Your email address will not be published. Required fields are marked *