Application Models
This chapter will guide you through some small enhancements to an existing add-on module. You already registered your add-on module in the Odoo instance in Chapter 3, Creating Odoo Add-On Modules. Now, you will explore the database aspects of the module in more depth. You will learn how to create a new model (database table), add new fields, and apply constraints. You will also discover how to use inheritance in Odoo to modify existing models. In this chapter, you will use the same module that you created in the previous chapter.
This chapter covers the following topics:
- Defining the model representation and order
- Adding data fields to a model
- Adding a float field with configurable precision
- Adding a monetary field to a model
- Adding relational fields to a model
- Adding a hierarchy to a model
- Adding constraint validations to a model
- Adding computed fields to a model
- Exposing related fields stored in other models
- Adding...