Enable Dark Mode!
how-to-add-chatter-to-the-form-view-in-odoo-15.jpg
By: Midilaj VK

How to Add Chatter to the Form View in Odoo 15

Technical Odoo 15

Chatter brings collaboration between users inside records. A user can write internal notes, communicate with other colleagues and customers, and track the changes. It will enrich your internal and external communications and streamline the operations. All the communication history, activities, and modifications will be shown inside chatter. Chatters are present in the form view of models; based on the screen size, it will be on the right side or at the bottom of the form view.

how-to-add-chatter-to-the-form-view-in-odoo-15

In this blog, we will be discussing how to add chatter to form view in Odoo.

I have created a student model, and a form view added currently chatter is not added to the form view.

how-to-add-chatter-to-the-form-view-in-odoo-15

Let’s see how to add chatter to this form view.

The current form view will look as follows:

how-to-add-chatter-to-the-form-view-in-odoo-15

To use chatter functionality, we have to inherit the mail.thread model to our custom model.

how-to-add-chatter-to-the-form-view-in-odoo-15

Inherit the model mail.thread to our custom model student.student. Just do this in the python file.

After that, we need to add the chatter section in the form view of this model. Change the existing form view like this

how-to-add-chatter-to-the-form-view-in-odoo-15

After the changes are made, upgrade the module (don't forget to add the mail in the dependent list of modules in the manifest). By now, the chatter will have been added to that form view.

how-to-add-chatter-to-the-form-view-in-odoo-15

There are different options available send messages, log a note and add attachments. A user can mention another user by using @ symbol. All the followers will be notified about messages posted in the chatter. One can also add or remove the followers.

how-to-add-chatter-to-the-form-view-in-odoo-15


how-to-add-chatter-to-the-form-view-in-odoo-15

In Odoo 15, messages can edit or delete directly from the chatter. You can click on the edit icon to edit the message and click the delete icon for deleting the message; confirmation will be asked before deleting the message.

how-to-add-chatter-to-the-form-view-in-odoo-15

Track Field value changes

Since Odoo is a multi-user system where different users can access the same record, it’s helpful to track the changes made to the fields by individual users to identify who made that particular change and when it was made. In Odoo, we can track the field values, and whenever the field value changes, it will be logged in to chatter.

In this example, I will track the field ‘Age’ in my student's model. For that, I am adding tracking=True parameter to my age field.

how-to-add-chatter-to-the-form-view-in-odoo-15

Here I added tracking=True to the age field. After changes are made, upgrade the module. Currently, the age field contains the value 23 here; I am changing it to 24 and saving the record.

how-to-add-chatter-to-the-form-view-in-odoo-15

After saving the record, the change made is logged into chatter.

how-to-add-chatter-to-the-form-view-in-odoo-15

Similarly, we can track the changes made to any field.

Now we can see how to add Schedule Activity features to the chatter. 

For this purpose, we have to inherit the mail.activity.mixin model to our custom model.

Change python file as shown below.

how-to-add-chatter-to-the-form-view-in-odoo-15

And in the XML file, add the activity_ids field.

how-to-add-chatter-to-the-form-view-in-odoo-15

Upgrade the module and see the changes.

Now we can see that the Schedule Activity button is added to the chatter to schedule activities directly from the chatter.

how-to-add-chatter-to-the-form-view-in-odoo-15

Similarly, we can add chatter to any form view for effective communication and traceability.


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

London

Cybrosys Limited
Alpha House,
100 Borough High Street, London,
SE1 1LB, United Kingdom

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