Chapter 5. Models – Structuring the Application Data

In the previous chapters, we had an end-to-end overview of creating new modules for Odoo. In Chapter 2, Building Your First Odoo Application, a completely new application was built, and in Chapter 3, Inheritance – Extending Existing Applications, we explored inheritance and how to use it to create an extension module for our application. In Chapter 4, Data Serialization and Module Data, we discussed how to add initial and demonstration data to our modules.

In these overviews, we touched all the layers involved in building a backend application for Odoo. Now, in the following chapters, it's time to explain in more detail these several layers making up an application: models, views, and business logic.

In this chapter, you will learn how to design the data structures supporting an application, and how to represent the relations between them.

Organizing application features into modules

As before, we will use an example to help explain the concepts. One of the great things about Odoo is being able to pick any existing application or module and add, on top of it, those extra features you need. So we are going to continue improving our to-do modules, and in no time they will form a fully featured application!

It is a good practice to split Odoo applications into several smaller modules, each of them responsible for specific features. This reduces overall complexity and makes them easier to maintain and upgrade to later Odoo versions. The problem of having to install all these individual modules can be solved by providing an app module packaging all those features, through its dependencies. To illustrate this approach we will be implementing the additional features using new to-do modules.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset