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

Vue components dynamic components detailed explanation

Table of contents Summarize Summarize When the ar...

A complete guide to CSS style attributes css() and width() in jQuery

Table of contents 1. Basic use of css(): 1.1 Get ...

How to query the minimum available id value in the Mysql table

Today, when I was looking at the laboratory proje...

The main differences between MySQL 4.1/5.0/5.1/5.5/5.6

Some command differences between versions: show i...

Solution to the low writing efficiency of AIX mounted NFS

Services provided by NFS Mount: Enable the /usr/s...

JavaScript canvas implements moving the ball following the mouse

This article example shares the specific code of ...

Implementation of IP address configuration in Centos7.5

1. Before configuring the IP address, first use i...

Several ways to implement "text overflow truncation and omission" with pure CSS

In our daily development work, text overflow, tru...

How to install MySQL 5.7 from source code in CentOS 7 environment

This article describes how to install MySQL 5.7 f...

How to solve the Mysql transaction operation failure

How to solve the Mysql transaction operation fail...

Detailed explanation of the usage of MySQL memory tables and temporary tables

Usage of MySQL memory tables and temporary tables...

XHTML introductory tutorial: Web page Head and DTD

Although head and DTD will not be displayed on th...

Initial summary of the beginner's website building tutorial

After writing these six articles, I started to fee...

Solution to Ubuntu 20.04 Firefox cannot play videos (missing flash plug-in)

1. Flash plug-in package download address: https:...

Detailed installation process of nodejs management tool nvm

nvm nvm is responsible for managing multiple vers...