Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Odoo Development Essentials

You're reading from   Odoo Development Essentials Fast track your development skills to build powerful Odoo business applications

Arrow left icon
Product type Paperback
Published in Apr 2015
Publisher Packt
ISBN-13 9781784392796
Length 214 pages
Edition 1st Edition
Languages
Arrow right icon
Toc

Table of Contents (12) Chapters Close

Preface 1. Getting Started with Odoo Development FREE CHAPTER 2. Building Your First Odoo Application 3. Inheritance – Extending Existing Applications 4. Data Serialization and Module Data 5. Models – Structuring the Application Data 6. Views – Designing the User Interface 7. ORM Application Logic – Supporting Business Processes 8. QWeb – Creating Kanban Views and Reports 9. External API – Integration with Other Systems 10. Deployment Checklist – Going Live Index

Installing Odoo from source

Ready-to-install Odoo packages can be found at nightly.odoo.com, available as Windows (.exe), Debian (.deb), CentOS (.rpm), and source code tarballs (.tar.gz).

As developers, we will prefer installing directly from the GitHub repository. This will end up giving us more control over versions and updates.

To keep things tidy, let's work in an /odoo-dev directory inside your home directory. Throughout the book, we will assume this is where your Odoo server is installed.

First, make sure you are logged in as the user created above, or during the installation process, and not as root. Assuming your user is odoo, you can confirm this with the following command:

$ whoami
odoo
$ echo $HOME
/home/odoo

Now we can use this script. It shows us how to install Odoo from source in a Debian system:

$ sudo apt-get update && sudo apt-get upgrade  # Install system updates
$ sudo apt-get install git  # Install Git
$ mkdir ~/odoo-dev  # Create a directory to work in
$ cd ~/odoo-dev  # Go into our work directory
$ git clone https://github.com/odoo/odoo.git -b 8.0  # Get Odoo source code
$ ./odoo/odoo.py setup_deps  # Installs Odoo system dependencies
$ ./odoo/odoo.py setup_pg  # Installs PostgreSQL & db superuser for unix user

At the end, Odoo should be ready to be used. The ~ symbol is a shortcut for your home directory (for example, /home/odoo). The git -b 8.0 option asks to explicitly download the 8.0 branch of Odoo. At the time of writing this book, this is redundant, since 8.0 is the default branch, but this may change, so it will make the script time resilient.

To start an Odoo server instance, just run odoo.py:

$ ~/odoo-dev/odoo/odoo.py

By default, Odoo instances listen from port 8069, so if we point a browser to http://<server-address>:8069 we will reach that instance. When we are accessing it for the first time, it will show us an assistant to create a new database, as shown in the following screenshot:

Installing Odoo from source

But we will learn how to initialize new databases from the command line, now so press Ctrl + C to stop the server and get back to the command prompt.

You have been reading a chapter from
Odoo Development Essentials
Published in: Apr 2015
Publisher: Packt
ISBN-13: 9781784392796
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at $19.99/month. Cancel anytime
Banner background image