How to Install Odoo with source code (DEV edition)

How to Install Odoo with source code (DEV edition)

i. Download Odoo Source Code

  1. Open the command prompt.

  2. Go to the directory where you want to take a clone of Odoo’s source code.

  3. Take a clone using the command (HTTPS).

    git clone https://github.com/odoo/odoo.git

ii. Install Python

Download the Python installer www.python.org/downloads/ and install it. (in 2024 for Odoo 17, I recommend Python 3.10.5 version)

iii. Install PostgreSQL (12 or newer version)

Download Postgresql from https://www.postgresql.org/download/ and install it.

Install Postgresql

Please select all the fields where we need pgAdmin4 later to access the database.

iv. Create a new PostgreSQL user

  1. Go to pgAdmin and follow the given steps.

For easiness username and password I set "odoo".

And set the privileges of the user.

V. Install Dependent Libraries

In the command prompt, go to the recently cloned Odoo repo where the requirements.txt file is located and run the commands:

note: I would like to recommend making a virtual environment.

#creating virtual env
python -m venv .venv
#activating virtual env
.\.venv\Scripts\activate

Your virtual environment is active. Now, open your terminal and copy and paste the below commands.

pip install setuptools wheel

pip install -r requirements.txt

VI. Configure Odoo & Start the Server

  1. Open the command prompt, visit the Odoo directory, and locate the Odoo-bin file.

  2. Run the command:

python odoo-bin -r db_user -w db_password --addons-path=addons -d demo_db

How to run odoo with postgresql

Now go to the browser and type localhost:8069

In the login screen, enter your email (admin) and password (admin) and Hit “Login”.

Now, You're Good to Go------>