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
Hey everyone,
I really enjoy this blog, continue the great work!
Nice post, very usefull to me.
Reggards from Cuba
Very very wonderful your work Mohsin,
Impressive how share the knowledge
Congratulations from Ecuador
thanks all guys
very much helpful…
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
@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)
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