Enable Dark Mode!
odoo-development-environment-i-ubuntu14.04-using-pycharm.png
By: Sreejith

Odoo Development Environment in UBUNTU14.04 using PYCHARM

Technical Odoo 8

Let us go through some steps required in setting up Odoo 8 for customization under Pycharm in ubuntu 14.04.


STEPS


 1. Install java latest version


Commands

sudo add-apt-repository PPA:webupd8team/java

sudo apt-get update

sudo apt-get install oracle-java8-installer

 

2. Setting up Pycharm

         

Install PyCharm from PPA:

1. To add the PPA, open terminal from the Dash, Launcher, or via Ctrl+Alt+T shortcut keys. When it opens, run the command:


 sudo add-apt-repository PPA:mystic-mirage/pycharm


2. After adding the PPA, update system package cache and install the IDE via Synaptic Package Manager. Or just run below commands one by one in terminal:


sudo apt-get update

sudo apt-get install pycharm


You may replace the last command via


sudo apt-get installs pycharm-community, to install the community version which is free.


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. Installing the 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


postgres commands


sudo su - Postgres  (to get into the postgres here you can type following to create a new user 'odoo' and assign role)

create user --createdb --username postgres --no-createrole --no-superuser --pwprompt odoo

when prompted for a password type 'odoo'

to see the postgres interpreter type 'psql'

type --------> ALTER USER odoo WITH SUPERUSER;  to change it to super user

the \du  ----> for the list of users (odoo can be seen)

to exit use '\q'

then 'exit' again to exit from the Postgres

 

 4. Installing python packages and dependencies

 

Open terminal and copy the following codes

 

Install Python Dependencies for Odoo 8

 

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 for Odoo 8

 

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-unittest2python-mock python-docutils lptools make python-psutil python-paramiko poppler-utils python-pdftools antiword

 

5. Get Odoo 8.0 source code.

Open the terminal and copy the following code


git clone -b 8.0 https://github.com/odoo/odoo.git

         

OR

 

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

  

6. Copy the OpenERP-server.conf file from the Odoo bin folder to outside

 

7. Set up a new project in the pycharm using the create new project

 

Edit the OpenERP-conf file as follows

 

[options]

; This is the password that allows database operations:

; admin_passwd = admin

db_host = localhost

db_user = odoo (username given when setting Postgres)

db_port = 5432

db_password = odoo (password given when setting postgres)

;addons_path = /home/cybrosys/odoo/odoo-8/addons (this is the path of the odoo addons)


8. Config PyCharm to run Odoo

 

Then in PyCharm menu Run –> Edit Configurations, click “+” on the top left to create a new configuration with the following settings:


Name:  odoo8

Single instance checkbox: checked

Script: /home/cybrosys/odoo/odoo-8/openerp-server

Script parameters:-c openerp-server.conf

Python interpreter: Python 2.7.6 (usr/bin/python2.7)

Working directory: /home/cybrosys/odoo/odoo-8


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



0
Comments



Leave a comment



whatsapp_icon
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