Chapter 5: Basic Server-Side Development
In Chapter 4, Application Models, we saw how to declare or extend business models in custom modules. The recipes in that chapter covered writing methods for computed fields, as well as methods to constrain the values of fields. This chapter focuses on the basics of server-side development in Odoo method definitions, recordset manipulation, and extending inherited methods. With this, you will be able to add/modify business logins in the Odoo module.
In this chapter, we will cover the following recipes:
- Defining model methods and using API decorators
- Reporting errors to the user
- Obtaining an empty recordset for a different model
- Creating new records
- Updating values of recordset records
- Searching for records
- Combining recordsets
- Filtering recordsets
- Traversing recordset relations
- Sorting recordsets
- Extending the business logic defined in a model
- Extending
write()
andcreate()
- Customizing...