How to install Odoo12 development environment on Windows 10

How to install Odoo12 development environment on Windows 10

Preface

Since many friends say they don’t have Mac computers, Windows development is actually not much different. It’s just a matter of personal habit. Besides, Windows computers can actually be configured with the environment quite quickly. I’ll add a relatively simple Windows environment deployment here, hoping it will be of some help to my friends.

Install Odoo12 development environment on Windows10

The packages we will install:

1) Git: Code Management

2) postgres: the database required for odoo12 to run

3) Docker: used to build postgres container and pgadmin4 container

4) python3.7.4: Python environment for running odoo12

5) Odoo requirements: Python dependency packages required to run Odoo

Project code:

Let's deploy it directly based on Chapter 3:

git clone -b v3.1 https://github.com/lingjiawen/odoo_project.git

1. Install Docker

Note: Windows 10 Home Edition cannot install Docker. If you are using Windows 10 Home Edition, please skip the Docker installation and directly install postgres10 and pgadmin on your computer. Please search for the specific installation method yourself.

1) Open Control Panel - Programs and Features - Turn Windows features on or off, check Hyper-V, click OK, and wait for the installation to complete.

2) Download and install Docker from the official website: https://hub.docker.com/editions/community/docker-ce-desktop-windows

2. Install git

Note: If you use a non-genuine Windows system, the git installation will cause the "uable to set system config..." problem. You need to disable the driver's mandatory signature, and you need to disable it every time you restart, otherwise git bash will crash.

Method: Click the Windows button in the lower left corner -> Settings -> Update and Security -> Recovery -> Click Restart Now, then wait for a while, and when the restart page appears, click Troubleshooting -> Advanced Options -> Restart Settings -> Restart, then wait for the page again, use keyboard 7 to select the seventh option to restart.

Then download git and install it: https://gitforwindows.org/

3. Install Visual Studio Build Tools

Download and install: http://go.microsoft.com/fwlink/?LinkId=691126

4. Install python3.7.4

Download and install: https://www.python.org/ftp/python/3.7.4/python-3.7.4-amd64.exe

5. Install postgres database and pgadmin4 using docker

docker pull postgres:10
docker pull dpage/pgadmin4

6. Pull the odoo code and put it in the odoo_project directory

git clone -b 12.0 https://github.com/odoo/odoo.git

After the pull is complete, rename the folder to odoo12 and put it in odoo_project

7. Install Odoo dependencies

pip install Pillow psycopy2 psutil

Use git bash to enter the odoo_project/odoo12 directory and install other dependencies:

cd codepath/odoo_project/odoo12
vim requirements.txt

Comment Pillow under the file
# Pillow==4.0.0

wqSave and exit pip install -r requirements.txt #Install dependencies

8. Run the postgres database

Enter the odoo_project directory and run docker-compose_db.yaml:

cd codepath/odoo_project
docker volume create --name=postgres_10_db_volume #First run to create a volume container docker-compose -f docker-compose_db.yaml up -d

Run pgadmin4:

# Run pgadmin, please set your own account and password docker run -p 8888:80 \
 -e "PGADMIN_DEFAULT_EMAIL=sysadmin" \
 -e "PGADMIN_DEFAULT_PASSWORD=sysadmin" \
 -d dpage/pgadmin4

9. Run Odoo

Install pycharm by yourself, open pycharm, and configure it the same as the Mac version, as shown in the figure:

Click OK, and then modify the addons_path in config/odoo.conf (the Windows path is different from the Mac path, the following relative path can also be used on Mac)

addons_path = odoo12/odoo/addons,odoo12/addons, my_addons
db_host = localhost # Windows cannot connect to the database using 0.0.0.0

Click Run to see the effect:

Summarize

The above is the method I introduced to you to install the Odoo12 development environment on Windows 10. I hope it will be helpful to you. If you have any questions, please leave me a message and I will reply to you in time. I would also like to thank everyone for their support of the 123WORDPRESS.COM website!
If you find this article helpful, please feel free to reprint it and please indicate the source. Thank you!

You may also be interested in:
  • Detailed explanation of the solution to the Windows 10 Java environment variable configuration problem

<<:  Summary of 3 minor errors encountered during MySQL 8.0 installation

>>:  80 lines of code to write a Webpack plugin and publish it to npm

Recommend

A brief discussion on the mysql execution process and sequence

Table of contents 1:mysql execution process 1.1: ...

Detailed explanation of incompatible changes of components in vue3

Table of contents Functional Components How to wr...

Example of how to set automatic creation time and modification time in mysql

This article describes how to set the automatic c...

How to decompress multiple files using the unzip command in Linux

Solution to the problem that there is no unzip co...

Vue uniapp realizes the segmenter effect

This article shares the specific code of vue unia...

A Brief Analysis on the Time Carrying Problem of MySQL

The default time type (datetime and timestamp) in...

Several solutions for forgetting the MySQL password

Solution 1 Completely uninstall and delete all da...

Example of using Nginx reverse proxy to go-fastdfs

background go-fastdfs is a distributed file syste...

How to use vs2019 for Linux remote development

Usually, there are two options when we develop Li...

Example code for drawing double arrows in CSS common styles

1. Multiple calls to single arrow Once a single a...

Several ways to implement inheritance in JavaScript

Table of contents Structural inheritance (impleme...

Common Linux English Error Chinese Translation (Newbies Must Know)

1.command not found command not found 2. No such ...

Code analysis of user variables in mysql query statements

In the previous article, we introduced the MySQL ...

How to move mysql5.7.19 data storage location in Centos7

Scenario: As the amount of data increases, the di...