Search Here

Configure and Install Odoo14 using PyCharm on Windows Platform

 In this article you will learn how to configure and install Odoo14 using PyCharm on Windows. I am going to show you step by step guide how to install Odoo 14 development environment using PyCharm IDE (Integrated Development Environment).

Configure and Install Odoo14 using PyCharm on Windows Platform

Software Needs to be Installed to Setup Odoo14


Required Software Supported Version
Python 3.6 or later to run
PostgreSQL 10.0 or later
Pycharm Community or Enterprise

Install and Configure Odoo14 with PyCharm on Windows 

To configure and install PyCharm with Odoo14 follow the below steps

  • Download and install Python version 3.6 or later
  • Setup Python environment variable
  • Download and install PostgreSQL 10 or later
  • Setup PostgreSQL environment variable
  • Create Login/Group Roles in PostgreSQL (To handle Odoo Database)
  • Install wkhtmltopdf (to print report in pdf)
  • Download Odoo14 from Github
  • Configure PyCharm with Odoo14
  • Install python dependencies for odoo14 using requirements.txt file (located in odoo14 root directory)
Visual C++ build tools need to be install, if it is not you will have some requirement libs that couldn't be install

Setting Up Python and PostgreSQL Environment Variable

To set the environment variable press the window key and search "Environment Variable" click on the "Edit the System Environment Variable" option, a dialog box will be open. Now click on the "Environment Variable" button. From the "System Variable" section double click on the "Path" option, a new dialog box will be open.

Now click on the "New" button and add the below line one by one.
  • C:\python38
  • C:\python38\Scripts
  • C:\Program Files\PostgreSQL\11\bin
  • C:\Program Files\wkhtmltopdf\bin
Setting Up Python and PostgreSQL Environment Variable


Creating PostgreSQL Database Login User Group Role

Before creating user and login roles, I am assuming you have installed PostgreSQL. To create user roles or login roles in PostgreSQL for Odoo14, press the window key and search for "pgadmin". After that Go to Servers >> PostgreSQL 10 and right-click on "Login/Group Roles" and click on "Create >> Login/Group Roles" option.

Creating PostgreSQL Database Login User Group Role

Now in the General section give the name of Login/Group Role, for example, "odoo14"

Creating PostgreSQL Database Login User Group Role

In the Definition, section give the password of Login/Group Role

In the Definition, section give the password of Login/Group Role

In the Privileges section select Yes for following options and Now click on the save button. 
  • Can Login
  • Superuser
  • Create Roles
  • Create Database
  • Update Catalog
  • Inherit rights from the parent roles

In the Definition, section give the password of Login/Group Role

Download Odoo14 from Source using GitHub

After downloading you have the following files in your downloaded odoo14 path.

Download Odoo15 from Source using GitHub

If you haven't "odoo.conf" file in your downloaded odoo14 >> debian directory, then create a new file in the odoo14 >> debian directory, and name that file as "odoo.conf" and paste the below code in that file.

[options]
; This is the password that allows database operations:
; admin_passwd = admin
db_host = localhost
db_port = 5432
db_user = odoo14
db_password = admin
db_filter = .*
addons_path = D:\UET\odoo14\odoo\addons
log_handler = [':INFO']
log_level = info
bin_path = C:\Program Files\wkhtmltopdf\bin

Setting Up Development Environment for Odoo14 using PyCharm

  • Open PyCharm and load (open) odoo14 directory
  • Now click on the "File" menu and then click "Settings"
  • Under Project click on "Project Interpreter" and give Python 3.6 path in Project Interpreter dropdown. 

Setting Up Python Interpreter for Odoo

Now click on the "Run" menu and click "Edit Configurations"

Click on the green + button and select "Python" to add a new configuration 


Parameter Value
Name odoo14
Script Path D:\uet\odoo14\odoo-bin
Parameters D:\uet\odoo14\debian\odoo.conf
Project odoo14
Python Interpreter Python 3.6.0 (C:\python36\python.exe)
Working Directory D:\odoo14

Setting Up Development Environment for Odoo14 using PyCharm

Installing Python Dependencies to run Odoo14 smoothly

To run Odoo14 we have to install python dependencies, we are going to install these libraries required for odoo14 using the "requirements.txt" file. You don't need to worry about that it comes with odoo installation source. 

How to Install Libraries or Packages in Python using Pip

You just have to run the below command to install such python dependencies (libraries).
py -m pip install -r requirements.txt
After executing the above code run "odoo14" by click on the play button in PyCharm.
If you are facing some error related to the python library then you can manually install these libraries by using the python pip command.
py -m pip install library_name_goes_here
Now run the service and try it on your browser and check localhost:8069
If all of the configurations were successful, your browser will navigate to the Odoo database manager, from where you can create a new database.

After creating a new database, if your Website CSS, SAAS, and Styles are not working and If you got the below error

The style compilation failed, see the error below
FutureWarning,
Usage: sassc [options] SCSS_FILE [OUT_CSS_FILE]

Then run the below command to resolve this error
py -m pip install libsass

Post a Comment

0 Comments