Book Image

Odoo Development Cookbook

By : Holger Brunn, Alexandre Fayolle, Daniel Reis
Book Image

Odoo Development Cookbook

By: Holger Brunn, Alexandre Fayolle, Daniel Reis

Overview of this book

Odoo is a full-featured open source ERP with a focus on extensibility. The flexibility and sustainability of open source is also a key selling point of Odoo. It is built on a powerful framework for rapid application development, both for back-end applications and front-end websites. The book starts by covering Odoo installation and administration, and provides a gentle introduction to application development. It then dives deep into several of the areas that an experienced developer will need to use. You’ll learn implement business logic, adapt the UI, and extend existing features.
Table of Contents (23 chapters)
Odoo Development Cookbook
Credits
About the Authors
About the Reviewers
www.PacktPub.com
Preface
Index

Creating and installing a new addon module


In this recipe, we will create a new module, make it available in our Odoo instance, and install it.

Getting ready

We will need an Odoo instance ready to use.

If the first recipe in Chapter 1, Installing the Odoo Development Environment, was followed, Odoo should be available at ~/odoo-dev/odoo. For explanation purposes, we will assume this location for Odoo, although any other location of your preference could be used.

We will also need a location for our Odoo modules. For the purpose of this recipe, we will use a local-addons directory alongside the odoo directory, at ~/odoo-dev/local-addons.

How to do it…

The following steps will create and install a new addon module:

  1. Change the working directory in which we will work and create the addons directory where our custom module will be placed:

    $ cd ~/odoo-dev
    $ mkdir local-addons
    
  2. Choose a technical name for the new module and create a directory with that name for the module. For our example we will use my_module...