Enable Dark Mode!
odoo-10-development-environment-in-ubuntu16-04-using-pycharm.png
By: Sreejith

How to Configure Pycharm for Odoo Development in Ubuntu 16.04?

Technical

Steps


1. Install Java

 sudo add-apt-repository ppa:webupd8team/java
 sudo apt-get update
 sudo apt-get install oracle-java8-installer


2. Installing Pycharm

 sudo sh -c 'echo "deb http://archive.getdeb.net/ubuntu $(lsb_release -sc)-getdeb apps" >> 	/etc/apt/sources.list.d/getdeb.list'
 wget -q -O - http://archive.getdeb.net/getdeb-archive.key | sudo apt-key add -
 sudo apt update
 sudo apt install pycharm

OR 


First, download the pycharm from pycharm download the .tar version for ubuntu

 

Then extract it after use 'cd'(change directory in terminal) to get to the bin directory of the pycharm folder and type 'ls' to see the files in it. Run the pycharm.sh file using the ./pycharm.sh.

 

Pin the pycharm to the taskbar then close the terminal


3. Install Postgres


1. Add the postgres to the api repository


sudo sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt/ `lsb_release -cs`-pgdg main" >> /etc/apt/sources.list.d/pgdg.list'
wget -q https://www.postgresql.org/media/keys/ACCC4CF8.asc -O - | sudo apt-key add -


2. Install the postgres


sudo apt-get update
sudo apt-get install postgresql postgresql-contrib


3. Postgres commands

- Login to postgres


sudo su postgres
createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo10
- Give a password
- To see the postgres interpreter
psql
- Change the user to superuser
ALTER USER odoo10 WITH SUPERUSER;
to exit use '\q'
then 'exit' again to exit from the postgres


4. Install Python dependencies


sudo apt-get install python-dateutil python-docutils python-feedparser python-jinja2 python-ldap python-libxslt1
python-lxml python-mako python-mock python-openid python-psycopg2 python-psutil python-pybabel python
pychart python-pydot python-pyparsing python-reportlab python-simplejson python-tz python-unittest2 python
vatnumber python-vobject python-webdav python-werkzeug python-xlwt python-yaml python-zsi poppler
utils python-pip python-pyPdf python-passlib python-decorator

 Install supporting packages


sudo apt-get install gcc python-dev mc bzr python-setuptools python-babel python-feedparser python-reportlab-accel
python-zsi python-openssl python-egenix-mxdatetime python-jinja2 python-unittest2 python-mock python-docutils
lptools make python-psutil python-paramiko poppler-utils python-pdftools antiword


5. Get odoo 10 source code

Clone odoo to your location


sudo git clone https://www.github.com/odoo/odoo --depth 1 --branch 10.0 --single-branch /opt/odoo

- Download the zip file from github or nightly and extract it to your directory


6. Install Less css via node js and npm


 sudo curl -sL https://deb.nodesource.com/setup_4.x | sudo -E bash -
sudo apt install -y nodejs
sudo npm install -g less less-plugin-clean-css


7. Create a file named “odoo-server.conf” inside setup folder

   [options]
:admin_passwd = admin
db_host = localhost
db_port = 5432
db_password = odoo
db_user = odoo10
xmlrpc_port = 8088
addons_path =/home/cybrosys/PycharmProject/odoo/odoo-10.0/my_addons



8. Configure pycharm give the details Then in PyCharm menu Run > Edit Configurations, click + on the top left to create a new configuration with the following settings:


odoo-10-development-environment-in-ubuntu16-04-using-pycharm-2-cybrosys

9. Now the configuration and run.

Your odoo is ready to run and you can develop your own add-ons and place them in my_addons(You can create your own folder and add them to conf file). Enjoy customization.

You can also have a look at Install Pycharm and Configure PostgreSQL on Ubuntu 18



If you need any assistance in odoo, we are online, please chat with us.



2
Comments

Christo Jose

thank you bro :)

28/09/2017

-

9:31AM

Gautam

I need your help to configure pycharm with odoo but i unable to do so. I have gone through your blog and tried the same steps mentioned but not successful. so can you help me over there?

07/04/2020

-

11:07PM



Leave a comment



whatsapp
location

Calicut

Cybrosys Technologies Pvt. Ltd.
Neospace, Kinfra Techno Park
Kakkancherry, Calicut
Kerala, India - 673635

location

Kochi

Cybrosys Technologies Pvt. Ltd.
1st Floor, Thapasya Building,
Infopark, Kakkanad,
Kochi, India - 682030.

location

Bangalore

Cybrosys Techno Solutions
The Estate, 8th Floor,
Dickenson Road,
Bangalore, India - 560042

Send Us A Message