Odoo 13 Development Environment in PyCharm
Configuring Pyharm to set up development environment for Odoo 13 in windows 10

This article lists the steps to setup development environment for Odoo 13  in windows 10 using PyCharm. Below are the the steps:

  • Python Installation
  • PostgreSQL Installation
  • Download Odoo Source 
  • Installing PyCharm Community Edition
  • Installing Requirements and configuring PyCharm

Python Installation

Download and install python according to the the specification of your system  from the link : https://www.python.org/downloads/ . (i.e. Python 3.7) . During installation dont forget to click add to path. 

PostgreSQL Installation

Install PostgreSQL . You can download the desired version from the link: https://www.enterprisedb.com/downloads/postgres-postgresql-downloads . (i.e. 10) . We would also need odoo user for PostgreSQL, so create odoo user with the command line. Go to the bin directory of PostgreSQL installation.

C:\Program Files\PostgreSQL\10\bin
and issue the command
createuser.exe --createdb --username postgres --no-createrole --pwprompt odoo
It will ask for password and create odoo user.

Download Odoo Source Code

Download the latest Odoo source code from https://nightly.odoo.com/13.0/nightly/src/ and extract  where you want to store the project directories. (i.e. D:/project/odoo13)

Install PyCharm

Download PyCharm community edition from https://www.jetbrains.com/pycharm/download/#section=windows and install. 

Installing Requirements and other configurations

At this point we installed all the main tools and now wen need to do configuration in pycharm and install necessary requirements to run odoo server.  These are given below;

  • Install python packages defined in requirements.txt file in odoo main folder (in our case D:/project/odoo13 ) with through command line using pip as below;
    >> pip3 install -r D:/project/odoo13/requirements.txt 

    Remember we need Microsoft visual C++ 14.0 . If it is missing, we will get an error "Microsoft Visual C++ 14.0 is required" .
    In this case we have to install it and details are given in the link https://www.scivision.dev/python-windows-visual-c-14-required/ .
    Simply download Offline installer: vs_buildtools.exe and while installing 
    Select: Workloads → Desktop development with C++, then for Individual Components, select only:  → C++ build tools 

  • After Successfully installing requirements let us configure PyCharm. Open pycharm and click open existing project and open directory we have saved the odoo source code (D:/project/odoo13) . After that go to the File -> Settings -> Project Interpreter and select python project settings and select the installed python (c:\python37\python.exe) and save it.
    After that go to Run -> Edit Configurations . Click + to add new configuration (select python) . Name the configuration whatever you want (i.e. odoo13) and then in Script path add path to the bin file 'odoo-bin' which is in odoo13 folder.  Make sure python interpreter is selected.  Save the configuration.  If odoo-bin is missing you can download from https://github.com/odoo/odoo/blob/13.0/odoo-bin .

  • Last step is to define the odoo.conf file.   Create a text file in odoo13 folder and add the following parameter:

    db_host = localhost
    db_port = 5432
    db_user = odoo
    db_password =odoo (the password you have provided when the user is created)
    xmlrpc_port = 9000
    addons_path = D:/projects/odoo13/odoo/custom
    pg_path= c:/Program Files/PostgreSQL/10/bin

    save the file as .conf
  • Further if you want to copy your custom modules in a separate folder, then you can create a folder 'custom' in  D/projects/odoo13/odoo/ . create__init__ .py file in this folder and paste the following:


We hope this will be helful for our readers, in case you have any question feel free to write us .