Chapter 6: Models – Structuring the Application Data
In this chapter, we will learn more about the model layer and how to use models to design the data structures that support applications. We will explore the available model types, when each should be used, and how to define constraints that enforce data validations.
Models are composed of data fields that support several data types, and some field types support defining relationships between models. More advanced usage of fields involves having values automatically computed using specific business logic.
The following topics will be covered in this chapter:
- Learning project – improving the Library app
- Creating models
- Creating fields
- Relationships between models
- Computed fields
- Model constraints
- Overview of the Odoo base models
Throughout these topics, you will learn how to create non-trivial data structures for your Odoo projects. By the end of this chapter, you should have...