Thursday, September 11, 2014

Set up OpenERP development enviroment in Eclipse IDE

Set up OpenERP development enviroment in Eclipse IDE



1. Download Eclipse IDE latest version and install pythonDev Plugin and Bazaar Plugin

2. Install python and postgresql

sudo apt-get install python
sudo apt-get install postgresql

3. Install python related packages to run openerp

sudo apt-get install python-dateutil python-docutils python-feedparser python-gdata 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

4. Download source from remote repository to local repository, may require public sshkey in launchpad account to download.

erp1@lenovo-thinkvision:~/bzr-repo/openerp$ bzr branch lp:openobject-server/7.0 server
erp1@lenovo-thinkvision:~/bzr-repo/openerp$ bzr branch lp:openerp-web/7.0 web
erp1@lenovo-thinkvision:~/bzr-repo/openerp$ bzr branch lp:openobject-addons/7.0 addons


5. Branch the local repository to your workspace.

erp1@lenovo-thinkvision:~/workspace/openerp$ bzr branch ~/bzr-repo/openerp/server/ server
erp1@lenovo-thinkvision:~/workspace/openerp$ bzr branch ~/bzr-repo/openerp/web/ web
erp1@lenovo-thinkvision:~/workspace/openerp$ bzr branch ~/bzr-repo/openerp/addons/ addons


6. Create a new database user. This is so OpenERP has access rights to connect to PostgreSQL and to create and drop databases. Remember what your choice of password is here, you will need it later on:

$ sudo su - postgres

createuser --createdb --username postgres --no-createrole --no-superuser --pwprompt openerp
Enter password for new role: ********
Enter it again: ********

Finally exit from the postgres user account:

exit

7. Create pythonDev project from eclipse for server, web and addon.

8. Create openerp-server.conf file in server directory with following content 

[options]
; This is the password that allows database operations:
; admin_passwd = admin
db_host = localhost
db_port = 5432
db_user = openerp
db_password = openerppwd
addons_path = ../web/addons,../addons
log_level = info
xmlrpc_port = 8069

9. Run server from commandline $ python openerp-server --config=openerp-server.conf

or 

create run configuration in eclipse.

Name: server openerp-server
Project: server
Main Module: ${workspace_loc:server/openerp-server}
Program Argument: --config=openerp-server.conf

10. Browse http://localhost:8069


*********************************************************************************
Thanks,
Ujwala H. Pawade.
!!!! Freedom Matters Not The Cost !!!!

No comments:

Post a Comment