Search Here

Configure and Install Odoo15 with PyCharm on Windows

 Odoo15 has been released, and for the time being this is the latest version of Odoo. In this article, I am going to show you how to set up Odoo15 Development Environment using PyCharm in Windows Platform.

Configure and Install Odoo15 with PyCharm on Windows


Development Requirement for Odoo15


Requirement Supported Version
Python 3.8 and later
PostgreSQL 10 and later
PyCharm Community or Enterprise

Configure and Install Odoo15 with PyCharm on Windows 

To configure and install PyCharm with Odoo15 follow the below steps

  1. Download and install Python version 3.8 or later
  2. Setup Python environment variable
  3. Download and install PostgreSQL 10 or later
  4. Setup PostgreSQL environment variable
  5. Create Login/Group Roles in PostgreSQL (To handle Odoo Database)
  6. Install wkhtmltopdf (to print report in pdf)
  7. Download Odoo15 from Github
  8. Configure PyCharm with Odoo15
  9. Install python dependencies for odoo15 using requirements.txt file (located in odoo15 root directory)
  10. 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.
  • C:\python38
  • C:\python38\Scripts
  • C:\Program Files\PostgreSQL\11\bin
  • C:\Program Files\wkhtmltopdf\bin
Now click on the "New" button and add the above line one by one. It means you have to add the above path by clicking on the new button four times.

Setting Up Python and PostgreSQL Environment Variable

Creating PostgreSQL Database Login User Group Role

To create user roles or login roles in PostgreSQL for Odoo15, press the window key and search for "pgadmin". After that Go to Servers >> PostgreSQL 11 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, "odoo15"

Creating PostgreSQL Database Login User Group Role



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


Creating PostgreSQL Database Login User Group Role


In the Privileges section select Yes for 
  1. Can Login
  2. Superuser
  3. Create Roles
  4. Create Database
  5. Update Catalog
  6. Inherit rights from the parent roles
Creating PostgreSQL Database Login User Group Role


Now click on the save button

Download Odoo15 from Source using GitHub

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


Download Odoo15 from Source using GitHub



If you haven't "odoo.conf" file in your downloaded odoo15 root directory, then create a new file in the odoo15 root 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 = odoo15
db_password = admin
db_filter = .*
addons_path = D:\UET\odoo15\odoo\addons
log_handler = [':INFO']
log_level = info
bin_path = C:\Program Files\wkhtmltopdf\bin


Setting Up Development Environment for Odoo15 using PyCharm

  • Open PyCharm and open odoo15 directory
  • Now click on the "File" menu and click "Settings"
  • Under Project click on Project Interpreter and give Python 3.8 path in Project Interpreter dropdown.

Setting Up Development Environment for Odoo15 using PyCharm

  • 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 odoo15
Script D:\odoo15\setup\odoo
Scrip Parameters -c D:\odoo15\odoo.conf
Project odoo15
Python Interpreter Python 3.8.0 (C:\python38\python.exe)
Working Directory D:\odoo15

Setting Up Development Environment for Odoo15 using PyCharm


Installing Python Dependencies for Odoo15

To run Odoo15 we have to install python dependencies, we are going to install these libraries required for odoo15 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 "odoo15" 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

 

Configure and Install Odoo15 with PyCharm on Windows

 

Post a Comment

2 Comments

  1. You didn't mention that visual c++ build tools need to be install, if it is not you will have some requirement libs that couldn't be install

    ReplyDelete
    Replies
    1. Thanks for your information, I have update it in the article.

      Delete