Odoo OpenERP – Adding followers to your newly created object

The Social Network module in Odoo / OpenERP introduces a messaging system based on a subscription mechanism. You might have came across this feature where there is a concept of followers on many screens. User can follow a particular record, and after doing so, user can have communication with all of the related persons of that transaction. User can follow multiple transactions in modules such as Purchase Order, Sales Order, Project Management, etc…

Odoo OpenERP – Adding followers to your newly created object.

In order to add followers into our own object,we have to inherit mail.thread into our class. There is no need to add any extra column in class. Please find following example which will explain the concept clearly. Please add these lines to .py file.

class class_name(osv.osv):

_name = “class.name”

_inherit = [‘mail.thread’]

_description = “Name Of The Class”

_columns = {


Also in form view, we have to add lines as follow.

<div class=”oe_chatter”>
<field name=”message_follower_ids” widget=”mail_followers” groups=”base.group_user”/>
<field name=”message_ids” widget=”mail_thread”/>

lines after </sheet> tag and the functionality of “Following” will appear in our object.

Hope you find this useful.


Leave a Reply