Enable Dark Mode!
how-to-add-chatter-to-the-form-view-in-odoo-16.jpg
By: Amaya Aravind EV

How to Add Chatter to the Form View in Odoo 16

Technical Odoo 16

In Odoo, chatter is used as an effective tool for collaborative work inside records. Using internal notes and tracking options, enrich your internal and external communications and streamlines operations with colleagues and partners. Inside chatter, all communication history, activity, and changes will be displayed.

Chatters are present in the form view of models. Depending on the screen resolution, they will be on the right side or at the bottom of the form view.

How to Add Chatter to the Form View in Odoo 16-cybrosys

So, let’s discuss how to add chatter in the form view. Here, I have a custom model, and currently, I haven't added the chatter view. So it will look like this,

How to Add Chatter to the Form View in Odoo 16-cybrosys

And the code will look like this.

How to Add Chatter to the Form View in Odoo 16-cybrosys

In order to add a chatter view, as a first and important step, we have to inherit the mail. thread model to our custom model. And add mail to the dependent list in the manifest.

How to Add Chatter to the Form View in Odoo 16-cybrosys

Also, add class and fields of chatter in XML like this.

How to Add Chatter to the Form View in Odoo 16-cybrosys

After upgrading the module, you will be able to see the newly added chatter in the form view.

There are options to send messages, add log notes, add attachments, view followers, and also an option to follow just by clicking the follow button.

How to Add Chatter to the Form View in Odoo 16-cybrosys

You can edit and delete the log notes from the lines by itself. Also, there is an option to edit, react with emojis, and add to favorites.

How to Add Chatter to the Form View in Odoo 16-cybrosys

Tracking fields changes

Odoo allows several users to access the same record. Thus it's important to keep track of the changes that users make to the fields.  We can keep track of the field values in Odoo, and every time one changes, Chatter will be notified.

For example, I have added tracking for the stage.

How to Add Chatter to the Form View in Odoo 16-cybrosys

If there is a change in the record status, it will be added as log. So, like this, we can add tracking to the field changes.

How to Add Chatter to the Form View in Odoo 16-cybrosys

Schedule activities from the chatter

From the chatter, we can also schedule activities. For that,  we have to inherit the mail.activity.mixin model to our custom model.

How to Add Chatter to the Form View in Odoo 16-cybrosys

After that, add the activity_ids field to the XML.

How to Add Chatter to the Form View in Odoo 16-cybrosys

After upgrading the module, we can see the Activities button is added to the chatter. So, from here, we can directly create, mark as done, edit, and cancel the activities.

How to Add Chatter to the Form View in Odoo 16-cybrosys

Like this, we can add chatter to any form view. 


If you need any assistance in odoo, we are online, please chat with us.



0
Comments



Leave a comment



whatsapp
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