Home > Eclipse, Financial Accounting, OpenERP, Postgresql, Python > OpenERP Developement and Dubugging in elipse

OpenERP Developement and Dubugging in elipse

I am assuming that you have installed OpenERP Server and OpenERP Client

Step 1: Install Eclipse (sudo apt-get install elipse)

Step 2: Install PyDev plugin in eclipse using this link http://pydev.org/updates

a. Help → Install New Software.

b. In Install dialog box, Click Add.

c. Give name ‘pydev’ and type the path. i.e. http://pydev.org/updates.

d. click ok.

e. select pydev checkbox and follow the steps by clicking finish.

Step 3: Now set the python interpreters libraries in eclipse from window → Preferences

a. In Preferences dialog box expand pydev from left side tree.

b. click on Interpreter-Python

c. click new on right side of python Interpreters

d. write name in Interpreter name like ‘pydev interpreter’ and browse the python like /usr/bin/python2.6

e. ok then again ok

Step 4: Import OpenERP-Server OpenERP-Client project in eclipse,

a. File → New → Project.

b. In new Project dialog box, Select General then select project.

c. Un check ‘use default location’

d. browse the openerp-server folder, and give a name in project name

e. click finish

f. repeat these steps to import openerp-client project in eclipse

Step 5: create a new user postgresql naming same like your Ubuntu user. (e.g. if my ubuntu user is mohsin then create a new postgresql user having name ‘mohsin’)

a. open terminal, type command ‘su postgres’. If u don’t remember ur postgres user password then use command like ‘sudo passwd postgres’.

b. At postgres@mohsin-desktop, create a new postgres user using command ‘createuser ubuntu_user -P’ e.g. createuser mohsin -P

c. terminal will ask for confirmation that ‘Shall the new role be a superuser? (y/n)’. press y.

d. type ‘su mohsin’ in terminal

Step 6: Run openerp-server.py file from eclipse in dubug mode (if server is already is running than stop that server using command ‘sudo /etc/init.d/openerp-server stop’ or kill running service of openerp-server.py using command ‘sudo ps aux | grep openerp’)

Step 7: Run openerp-client.py from eclipse.

Step Enjoy debug mode

  1. September 9, 2010 at 8:15 pm

    Hey everyone,

    I really enjoy this blog, continue the great work!

  2. Dairon Medina
    October 15, 2010 at 7:10 pm

    Nice post, very usefull to me.
    Reggards from Cuba

  3. 1000tonlab
    January 3, 2011 at 10:48 pm

    Very very wonderful your work Mohsin,
    Impressive how share the knowledge

  4. 1000tonlab
    January 3, 2011 at 10:49 pm

    Congratulations from Ecuador

  5. January 4, 2011 at 8:10 am

    thanks all guys

  6. V
    December 22, 2011 at 1:17 pm

    very much helpful…

  7. Priyanka
    July 4, 2012 at 8:36 am

    after debugging i can get the windows.that’s good.From there i want to go where different modules work?such as i want to see HR recruitment code.I couldn’t do that

  8. July 5, 2012 at 5:23 am

    @priyanka kindly set the break point first,
    1. by right click on left bar of python code view in eclipse and click ‘Add BreakPoint’.
    2. or double click left bar of python code view in eclipse
    then try to access from client. this time u will be prompt for debugging mode.
    kindly check this video
    How to add a breakpoint (Eclipse)

  9. priyanka
    July 17, 2012 at 4:27 pm

    i gave breakpoints.But it was not responding.Here i did a mistake.that is server and client project were different.That’s why it may not be working.will client part also run in debug mode?running client and server in debug mode i couldn’t access the addons code.Any pydev debugger named pdb is needed to dubug?Thank you

  10. sdorey
    April 3, 2014 at 10:10 am

    Great post ! Helped a lot

  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: