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.
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
- Download and install Python version 3.8 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 Odoo15 from Github
- Configure PyCharm with Odoo15
- Install python dependencies for odoo15 using requirements.txt file (located in odoo15 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.
- 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.
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.
Now in the General section give the name of Login/Group Role, for example, "odoo15"
In the Definition, section give the password of Login/Group Role
In the Privileges section select Yes for
- Can Login
- Superuser
- Create Roles
- Create Database
- Update Catalog
- Inherit rights from the parent roles
Download Odoo15 from Source using GitHub
After downloading you have the following files in your downloaded odoo15 path.
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.
Read More: What is odoo.conf file and why we use it
[options]; This is the password that allows database operations:; admin_passwd = admindb_host = localhostdb_port = 5432db_user = odoo15db_password = admindb_filter = .*addons_path = D:\UET\odoo15\odoo\addonslog_handler = [':INFO']log_level = infobin_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.
- 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 |
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 belowFutureWarning,Usage: sassc [options] SCSS_FILE [OUT_CSS_FILE]
Then run the below command to resolve this error
2 Comments
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
ReplyDeleteThanks for your information, I have update it in the article.
Delete