Search Here

Configure PyCharm with Odoo

Today I am going to show you how to configure PyCharm with Odoo. PyCharm is an IDE, than can be used for development purpose. You can configure PyCharm with Odoo in Windows, Linux and mc operating systems.



Configure PyCharm with Odoo

Setting up Odoo development environment in windows using PyCharm

In this tutorial I will discuss how to configure PyCharm with Odoo in windows environment. You have to follow below steps to configure PyCharm with Odoo.

Recommend:


  • Download python 2.7.16 or above version
  • Install python 2.7.16
  • Setting the environment variable for python


Setting up Odoo development environment in windows using PyCharm


  • After installing python, we need to Download Microsoft Visual C++ Compiler
  • Install above Microsoft Visual C++ Compiler
  • Download PostgreSQL and install it
  • After installing PostgreSQL, create user (role) from pgAdmin or by using command prompt using following code.
Read More: Configure and Install Odoo15 with PyCharm


createuser.exe --createdb --username postgres --no-createrole --pwprompt odoo    
 


Setting up Odoo development environment in windows using PyCharm

  • Open PyCharm and create a new "Pure Python" project, with the folder which we have extracted.


Setting up Odoo development environment in windows using PyCharm


Setting up Odoo development environment in windows using PyCharm


  • Setting python interpreter as your desired python in our case its 2.7.16. To do this go to "File" menu and click on "Setting". Now click on "Project Interpreter" on the left side of given menus and set your desired version of python from drop-down on the right hand side of the box.


Setting up Odoo development environment in windows using PyCharm


  • To run Odoo server now we need to edit configuration in our PyCharm project, the purpose of doing this activity is we are going to tell the PyCharm that, how to run our project? In this case we need to configure on which basis run Odoo server, to do this go "Run" menu and click "Edit Configuration".


Setting up Odoo development environment in windows using PyCharm




If you did not have this file in your downloaded Odoo source folder than, create a new file named "openerp-server" with ".conf" extension and copy above code and paste it in your newly created file.

Setting up Odoo development environment in windows using PyCharm



  • Now in last step we are going to install python libraries and site packages. Fortunately Odoo Source has a text file (requirements.txt) of all the required python packages with name and their version. We just need to pip install this text file using below command.


python -m pip install -r requirements.txt      
 

Now restart the odoo services, if you got any error related to python packages, just install this package using pip.


pip install pywin32      
 

Now we can run Odoo from PyCharm.

Post a Comment

1 Comments