Odoo 16 Development Book


Chatter is the method of communication tool placed on most of the data in Odoo. It helps you to e-mail clients without delay from a buy order, income order, and so on., for example, to discuss info and live in touch. employees can use internal notes that are not seen by clients to inform each other approximately development or problems in the workflow. Other users also can be brought about to enroll in communication by using being introduced as a Follower to the document, even if they were not initially worried.

For example, if we take any sale order in the shape closer to the bottom or to the right of the document. Let's look for the chatter.

odoo Development

You'll find the following options there:

The symbol ‘@’is used to mention a person, and to mention the channels, ‘#’ is used. Here we can use emojis for posting the reactions. Attachment of document is also possible if needed.

Log Note: This is useful for keeping track of progress with customers.

odoo Development

Here also can add attachments.

Schedule Activity: By this, one can assign scheduled activities to people.

odoo Development

It shows the number of attachments and lets you add attachments

odoo Development

Follow/ Following: It indicates whether you're following it at a look. You may unfollow the file by hovering over the ‘following’ and clicking on the ‘unfollow.’

Also, one can view the followers by clicking the button near to followers. By clicking the button you can edit and remove the followers and add new members to the existing follower list.

odoo Development

You can click ‘Add Followers,’ then the below window will pop.

odoo Development

Required followers can be added from here.

Editing options are available in the followers list. A list of subscriptions that can be allowed or disabled for the selected follower.

odoo Development

After including the messages, logging notes, or scheduling the activities, the entirety will appear inside the chatter of the form view. So this is the feature defined at the chatter.

Every so often, if we change a few fields within the form view, the alternate will trigger and be shown within the chatter. This feature is called “Tracking”.

odoo Development

It is simple to enable tracking for a field. Field declaration when referring to tracking attributes. You can enable tracking by setting this attribute to true. Within the field declaration, you can set Tracking='True' . Odoo is a multi-user platform, and any user can access and update the same records at any time.

In these circumstances, we must keep track of the field values. Odoo chatter keeps track of this information automatically.

How to Add Chatter to the Form View

Chatter is a basic feature available in Odoo. You can add it to your form view in a few steps. To get the basic chat into the form we want, we need to inherit the mail.thread model in our python file.

class ClassName(models.Model):
    _name = 'custom.model'
    _inherit = 'mail.thread'

Also, the dependency should be added to the manifest file as "Mail." These are the things you need to add to your Python file. Now we need to move on to the XML file. After a sheet of forms, you can define chatter; For example,

<record id="view_id" model="ir.ui.view">
    <field name="name">name.name</field>
   	<field name="model">model.model</field>
 	<field name="arch" type="xml">
        <form string="">
            <div class="oe_chatter">
                <field name="message_follower_ids"
                <field name="message_ids"/>

Here the division ‘oe_chatter’ defines the chatter. It contains two fields: "message_follower_ids" and "message_ids." These fields are related to chat base fields. There is another function called "Schedule Activity." To do this, we need to inherit from another model. It's a "mail.activity.mixin" that allows you to add fields to your XML file.

<field name="activity_ids" widget="mail_activity"/>

Together the basic chatter including the activity option can be added by inheriting the models;

_inherit = ['mail.thread', 'mail.activity.mixin'] 

The XML file should be like the following code,

<div class="oe_chatter">
    <field name="message_follower_ids" 
    <field name="activity_ids" widget="mail_activity"/>
    <field name="message_ids" widget="mail_thread"/>

One of the most crucial reasons to enclose ‘chatter’ in your module is to maintain track of activity in a certain region of the module. So that is how we will make use of the chatter in Odoo.



Cybrosys Technologies Pvt. Ltd.
Neospace, Kinfra Techno Park
Kakkancherry, Calicut
Kerala, India - 673635



Cybrosys Technologies Pvt. Ltd.
1st Floor, Thapasya Building,
Infopark, Kakkanad,
Kochi, India - 682030.



Cybrosys Techno Solutions
The Estate, 8th Floor,
Dickenson Road,
Bangalore, India - 560042

Send Us A Message