Odoo 17 Development Book

Chatter

Chatter serves as a communication tool integrated into various data elements within Odoo. This feature facilitates direct email communication with clients, enabling seamless interaction from documents like purchase orders and sales orders. It allows users to discuss details and stay connected. Internal notes, visible only to employees, provide a means for team members to share updates or address workflow issues. Additionally, individuals can be included in the communication by becoming a Follower of the document, even if they were not initially part of the discussion.

For instance, consider any sales order positioned towards the bottom or the right side of the document. Now, let's locate the Chatter section.

odoo-development

Within this section, you'll encounter the following features:

  • The symbol '@' is employed to mention a specific individual, while channels are mentioned using the symbol '#'.
  • Emojis can be utilized for expressing reactions to the content.
  • If necessary, document attachments can be added to enhance communication.

Log Note: This feature proves beneficial for maintaining a record of progress and interactions with customers.

odoo-development

Log Note: This feature proves beneficial for maintaining a record of progress and interactions with customers.

odoo-development

Schedule Activity: With this functionality, you can allocate and assign scheduled activities to individuals.

odoo-development

The attachments icon shown in the below image shows the number of attachments.

odoo-development

Follow/Following: This feature indicates whether you are currently following the document at a glance. You can unfollow the file by hovering over the 'following' and clicking on 'unfollow.'

Additionally, you can view the list of followers by clicking on the followers icon. Within this section, you have the ability to edit, remove existing followers, and add new members to the current follower list.

odoo-development

If you click on 'Add Followers,' the following window will appear.

odoo-development

Editing options are accessible within the followers list.

odoo-development

A list of subscriptions that can be enabled or disabled for the chosen follower.

odoo-development

After incorporating messages, logging notes, or scheduling activities, the complete record will be visible within the chatter of the form view. This functionality is encapsulated in the chatter.

odoo-development

Periodically, when certain fields are modified within the form view, the alteration will be triggered and displayed in the chatter. This capability is referred to as "Tracking."

Enabling tracking for a field is straightforward and involves specifying tracking attributes in the field declaration. By setting the Tracking attribute to true, you activate tracking. This is achieved within the field declaration by setting Tracking='True'.

Given that Odoo operates as a multi-user platform, allowing multiple users to access and update records simultaneously, it becomes imperative to monitor field values. Odoo's chatter feature automatically tracks and records this information.

How to Add Chatter to the Form View

Chatter is a fundamental feature provided in Odoo. You can incorporate it into your form view with just a few steps. To integrate the basic chat functionality into the desired form, it is necessary to inherit the mail.thread model in your Python file.

class ClassName(models.Model):

       _name = 'custom.model'
       _inherit = 'mail.thread'

Additionally, ensure to include the dependency in the manifest file as "Mail." These are the necessary elements to be added to your Python file. Next, proceed to the XML file. Following a sheet of forms, you can define the chatter. For instance,

<record id="custom_model_view_form" model="ir.ui.view">
    <field name="name">custom.model.view.form</field>
    <field name="model">custom.model</field>
    <field name="arch" type="xml">
        <form string="">
            <sheet>
                <div class="oe_chatter">
                    <field name="message_follower_ids" groups="base.group_user"/>
                    <field name="message_ids"/>
                </div>
             </sheet>
        </form>
    </field>
</record>

In this context, the section labeled 'oe_chatter' delineates the chatter and encompasses two fields: "message_follower_ids" and "message_ids," which are associated with the fundamental chat functionalities. Another notable function is "Schedule Activity." To implement this, inheritance from another model is required, specifically the "mail.activity.mixin," enabling the addition of fields in your XML file.

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

The comprehensive chatter, including the activity option, can be incorporated by inheriting the models as follows:

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

The XML file structure should resemble the code provided below:

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

One of the key reasons for incorporating the 'chatter' into your module is to track activities within a specific section of the module. This is how we leverage the chatter in Odoo.

whatsapp_icon
location

Calicut

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

location

Kochi

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

location

Bangalore

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

Send Us A Message