Blog Post


Odoo 10 setup and debug in Eclipse

Hi everyone, I’m writing this post to describe an installation process of Odoo and its debug in Eclipse IDE on Windows. There are articles exist on the internet dedicated to this theme, but none of them covers this task in relation to Odoo version 10. Odoo 10 differs from the other versions, plus it ships with another set of setup files, so if you’re interested in detailed description of Odoo setup in Eclipse – this post may be helpful.

We need the source code of Odoo to make the debugging possible, so let’s start with Odoo 10 source code downloading: you can do this either by going to GitHub or just by downloading it from Odoo’s official site. In first case you’ll have to wait much longer since there’s the entire commit history is downloaded as well. Let’s say that Odoo source is downloaded to C:/Users/Lenovo/git/Odoo.

Odoo 10 is based on Python 2.7 and if you don’t have it installed locally – please do it using the official site of Python. Odoo requires a few Python libs (such as Babel, ebaysdk, lxml, python-ldap etc.) that are not shipped within a standard Python bundle, these libs should be installed manually to your Python. Luckily Pip package manager is already persist in downloaded Python distributive and you can easily use it to install required packages. Within Odoo distribution directory you can find requirements.txt file that keeps all package names + version to be installed. In this way go to %Python_dir%/Scripts folder where pip.exe is located and run the following command (assuming requirements.txt is placed in current dir):

pip install -r requirements.txt

After that almost all packages required to Odoo will be installed. Since we’re on Windows we need to install win32service as well. This module is not stored in Pip repository, it should be downloaded from the sourceforge directly taking in mind the 2.7 Python version. I’d recommend to download and run exe-file exactly from this source, since we’ve tried to take win32service from the other repositories, none of them worked.

Now it’s time to start Eclipse. Install (if not yet) PyDev plugin: go to Window -> Preferences -> Install/Update -> Available Software Sites. Fill in new site name, e.g. “PyDev” and its URL

Next step is to set up Python Interpreter that will be used by PyDev. Interpreter itself is a local dir where the Python is installed. Go to Window –> Preferences –> PyDev –> Interpreters –> Python Interpreter –> New, then specify a path to your Python installation and click Save. As an example, assume that installation dir is C:/Python27 then PyDev will search for its subdirs to find all modules location and add them to System PYTHONPATH, the final look of the interpreter view:


When the Python interpreter is installed, we can move further. Next step is to create new PyDev project in Eclipse. It’s pretty straightforward, pick Python project type, specify project name and select the Python interpreter we’ve just created. If you wish to attach Odoo source code to current project (we will need it since we’ll have custom code that uses Odoo modules and project’s main module refers to odoo module as well – see below), then open project Properties window, navigate to PyDev –PYTHONPATH, go to External Libraries path, add Odoo source folder (source folder is the one we’ve created while cloning the Odoo Git repo):


Good, we’re almost done. Let’s configure Debug configuration. Create a new Python Run, select the project we’ve created, define main module. Main module is the python file that actually starts Odoo. This file called and has the content:

import odoo

if __name__ == "__main__":

In previous versions of Odoo (earlier than 10) this main module was called, in Odoo 10 it is missing, so there’s need to create a new one, e.g. Main tab of Debug configuration looks so:


The final thing we should define on Debug configuration form is to add Odoo configuration file that keeps information about database URL, user name, DB password + source code locations. This file odoo.conf can be found under Odoo distribution dir, the minimal and sufficient version of it may look as following:

db_host = False
db_port = False
db_user = odoo
db_password = False
addons_path = C:\Users\Lenovo\git\odoo\addons,C:\workspace_o

Now we need to specify for our Debug configuration a path to current Odoo configuration file. Go to Arguments tab –> Program arguments –> Variables –> Edit Variables –> New. Here create a new variable with any name, the Value of the variable should be a path to the config file: --config=%PATH%/odoo.conf.

Finally you can run you Debug configuration, set up some breakpoint and see how the Odoo (as well as your custom module) execution stops for debug purposes, the debug trace and program variables can be watched.

Comments (7)

Tags: odoo



hicham Oct 11, 2017 at 18:14 #

bonjour; je vous remercie pour votre article c'est intéressant j'ai suivi les etapes mais ça marche pas pour moi l’osque je lance le debug pydev debugger: starting (pid: 6228) Unknow command 'C:\\odoo-10.0\\debian\\odoo.conf' merci


Stan Nov 09, 2017 at 20:53 #

Hey, thank you. You probably haven't specified the correct way to your odoo.conf


taimur Mar 10, 2018 at 18:24 #

thanks for elaboration point of


dimitri Apr 17, 2018 at 10:12 #

i ve the error error: option --config not recognized when debugging, please can you help me


Paulo Matos Jan 17, 2019 at 21:51 #

The post is really great. Somethings are missing. 1- I believe we have first to create the file "" and then on Debug configuration we have to point to this new file created is that correct? 2- Where do I put the "odoo.conf" file? Should I create it under "workspace\project_name"? You did not refer where Eclipse will find for this file (%PATH%)? Thank you very much for your great post


Graham Jan 30, 2019 at 02:00 #

Would you be so kind as to create a similar article for odoo 12.0 please.


Tableau online training Jun 26, 2019 at 08:45 #

I would like to thank you for your nicely written post, its informative and your writing style encouraged me to read it till end. Thanks

Leave a Comment