Chapter 4: Application Models
The recipes in this chapter will make small additions to an existing add-on module. In the previous chapter, we registered our add-on module in the Odoo instance. In this chapter, we will dive deeply into the database side of the module. We will add a new model (database table), new fields, and constraints. We will also examine the use of inheritance in Odoo. We will be using the module we created in the recipes in Chapter 3, Creating Odoo Add-On Modules.
In this chapter, we will cover the following recipes:
- Defining the model representation and order
- Adding data fields to a model
- Using a float field with configurable precision
- Adding a monetary field to a model
- Adding relational fields to a model
- Adding a hierarchy ...
Get Odoo 14 Development Cookbook - Fourth Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.