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

Using scaffold to create a module


When creating a new Odoo module, there is some boilerplate that needs to be set up. To help quick starting new modules, Odoo provides the scaffold command.

The recipe shows how to create a new module using the scaffold command, which will put in place a skeleton of the files directories to use.

Getting ready

We need Odoo installed and a directory for our custom modules.

We will assume that Odoo is installed at ~/odoo-dev/odoo and our custom modules will be at ~/odoo-dev/local-addons.

How to do it…

The scaffold command is used from the command line:

  1. Change the working directory to where we will want our module to be. This can be whatever directory you choose, but within an addons path to be useful. Following the directory choices used in the previous recipe, it should be as follows:

    $ cd ~/odoo-dev/local-addons
    
  2. Choose a technical name for the new module and use the scaffold command to create it. For our example, we will choose my_scaffolded:

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