How to Setup Odoo 16 Development Environment

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

Step : 1 Update the system

sudo apt update
sudo apt 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 install python3-pip
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 : 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 PostgreSQL database

sudo apt-get install postgresql

Step : 6 Create a PostgreSQL database

sudo su - postgres
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo16
Alter User to superuser
Exit from psql

Step : 7 Install Wkhtmltopdf

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

Step : 8 Install Git

sudo apt-get install git

Step : 9 Clone Odoo 16 (Community Edition)

git clone --depth 1 --branch 16.0 --single-branch odoo16

Step : 10 install required Python packages requirements.txt

cd odoo16
sudo pip3 install -r requirements.txt

Step : 11 Open the Odoo 16 project in Pycharm

Create A New Python Virtual Environment

Step : 12 Create odoo.conf File inside Odoo16 Directory

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

Step : 13 Add Python Interpreter

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

*You make with name : odoo16 replace odoo15 –>to odoo16

Pycharm edit config

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

Step : 14 Open your Browser localhost:8016

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 *