Using inheritance to add social network features
The social network module (technical name
mail) provides the message board found at the bottom of many forms, also called Open Chatter, the followers are featured along with the logic regarding messages and notifications. This is something we will often want to add to our models, so let's learn how to do it.
The social network messaging features are provided by the
mail.thread model of the
mail module. To add it to a custom model we need to:
- Have the module depend on
- Have the class inherit from
- Have the Followers and Thread widgets added to the form view.
- Optionally, set up record rules for followers.
Let's follow this checklist:
Regarding #1, since our extension module depends on