O'Reilly logo

Odoo Development Essentials by Daniel Reis

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 mail.
  • Have the class inherit from mail.thread.
  • 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

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required