In the previous chapters, we learned about the model layer, how to build the application data structures, and then how to use the ORM API to store and explore that data. In this chapter, we'll be leveraging what we learned about models and recordset handling to implement business logic patterns that are common in applications.
We'll discuss the following topics in this chapter:
- Using stages for document centered workflows
- The ORM method decorators;
@api.multi
,@api.one
, and@api@model
- On change methods, for immediate reaction to users
- Using the ORM built-in methods, such as
create
,write
, andunlink
- The message and activity features, provided by the
mail
add-on module - Creating a wizard to assist users to do non-trivial actions
- Using log messages for better system observability
- Raising exceptions to give feedback to the user when things go wrong
- Unit tests to automate the quality checks on your code
- Development tools, aiding developer work, such...