Odoo development Ubuntu using Eclipse.


In this blog we will go through the steps required or OpenERP V6.1 Customization under the eclipse editor in Ubuntu 11.10.
Run the following commands in from the terminal.
First of all you must have to run all the commands as super user so all the commands must be run as "sudo <commnad>"
Install eclipse & its dependencies.
sudo apt-get update
sudo apt-get install eclipse
2. Install python and its libraries packages required for openerp-server
sudo apt-get install python python-psycopg2 python-reportlab  python-pychart python-pydot python-egenix-mxdatetime python-lxml python-libxslt1 python-tz python-dateutil python-vobject python-mako python-yaml python-dev python-setuptools python-pybabel
3.  OpenERP server uses Postgresql database server for its backend so we need to install it.
sudo apt-get install python-software-properties
sudo add-apt-repository ppa:pitti/postgresql
sudo apt-get update
sudo apt-get install postgresql-9.1 postgresql-client-9.1 
postgresql-  contrib-9.1
4. Create a database user for OpenERP in Postgresql server, who can create  databases and manipulate them.
sudo su postgres
createuser <system-user-name> (enter "y" for super user role)
exit
5. To allow postgres database to be accessed by anywhere in pgadmin3 we need to do following steps.
-- edit /etc/postgresql/9.1/main/postgresql.conf and change the following properties.
 uncomment the listen_addresses property and set it to,
listen_addresses = "*"
-- edit  /etc/postgresql/9.1/main/pg_hba.conf and do as follows,






Replace following portion ,
# IPv4 local connections:
host    all             all             127.0.0.1/32            md5
with,
# IPv4 local connections:
host    all             all             0.0.0.0/0            md5 
( This will allow all IP's to connect with your postgresql server.)
6.   Openerp-server V6.1 requires Werkzeug and Python-openid packages to be installed.
     wget http://pypi.python.org/packages/source/W/Werkzeug/                           
    tar -zxvf  Werkzeug-0.8.3.tar.gz
     cd Werkzeug-0.8.3      
     python setup.py install                   
     wget http://pypi.python.org/packages/source/p/python-openid/    
     tar -zxvf python-openid/python-openid-2.2.5.tar.gz
     cd python-openid-2.2.5
     python setup.py install
7.   Install PyDev plugin in eclipse
       6.1)help -> Install New Software.
       6.2)In Install dialog box, Click Add.
       6.3)Give name ‘pydev’ and type the path. i.e.
       6.4)click ok.
       6.5)select pydev checkbox and follow the steps by clicking finish.


8.     Adding python in eclipse can be done by


      7.1)window -> Preferences
       7.2)In Preferences dialog box expand pydev from left side tree
       7.3)click on Interpreter-Python
       7.4)click new (python interpreter)
       7.5)browse and select  "File System-->usr-->bin-->python" and  also give name "python2.7"
       7.6) click ok then again ok
9.   Download Openerp 6.1 source tarball from,
     http://nightly.openerp.com/6.1/releases/openerp-6.1-1.tar.gz


10.   Extract the tarball downloaded and create a folder Openerp and move the tarball and extract it there, rename it to Openerp-6.1
11.  Switch the workspace folder to created Openerp folder and create a new Pydev project in eclipse named Openerp-6.1.
         New-> project --> Pydev --> Pydev project
         project name - Openerp-6.1
         check Use default
         Press F5 after creating the project to refresh the workspace. 
12.   In Eclipse package explorer, Rename openerp-server in Openerp-6.1 folder to openerp-server.py.
        Right Click on,  openerp-server.py --> Run as --> Python run. 
Notes:  
In version 6.1, When server gets started, then it will automatically start the OpenERP Web also.  We don't have to start the OpenERP Web manually. 
The Default port the server starts on is 8069, but if you want to change that port then you can change it from the config.py file.