How to Add Chatter (Messages) to Your Custom Module in Odoo 17

November 20, 2025 by
How to Add Chatter (Messages) to Your Custom Module in Odoo 17
Widuri Sugiyani

Adding a Chatter (the Messages, Notes, and Activities panel) to your Odoo form view is one of the easiest ways to improve communication inside your module. With just a few lines of code, any model can support internal messages and activities. This guide explains the simplest way to add chatter, perfect for beginners or quick development work.


What Is the Chatter in Odoo?




The Chatter is is a built-in communication and collaboration panel that appears on many Odoo forms — like CRM Leads, Sales Orders, Projects, and more. It allows users to:
  • Send internal messages
  • Log notes
  • Track activities
  • View communication history
To enable it for your own model, you just need to inherit the right mixins and include the chatter in your form view.

Add Mail Thread Mixin to Your Model


Open your model file: 

models/your_model.py 

Add these two mixins:

class Product(models.Model):
    _name = 'custom.modul.product'
    _description = "Product"
    _inherit = ['mail.thread','mail.activity.mixin']

    name = fields.Char(string="Product")
    genre_ids = fields.One2many('custom.modul.genre','product_id',string="genre")
    category_id = fields.Many2one('product.category', string="Category")

What the mixins do:

If you only want basic messages (without activities), you can use only:
_inherit = ['mail.thread']

Add Tracking to Important Fields


Make field changes appear in the chatter by adding tracking=True:

class Product(models.Model):
    _name = 'custom.modul.product'
    _description = "Product"
    _inherit = ['mail.thread','mail.activity.mixin']

    name = fields.Char(string="Product", tracking=True)
    genre_ids = fields.One2many('custom.modul.genre','product_id',string="genre")
    category_id = fields.Many2one('product.category', string="Category", tracking=True)



Add the Chatter to Your Form View


Open your XML file:

views/student_record_view.xml

Add <div class="oe_chatter"> at the bottom of the form:

<record id="product_form_views" model="ir.ui.view">
        <field name="name">product.form</field>
        <field name="model">custom.modul.product</field>
        <field name="arch" type="xml">
            <form>
                <sheet>
                     <group>
                        <field name="name" string="Product"/>
                        <field name="category_id"/>
                    </group>
                    <notebook>
                        <page string="Product Detail" name="product">
                            <field name="genre_ids" widget="section_and_note_one2many" mode="tree,kanban">
                                <tree string="Genre" editable="bottom">
                                    <field name="genre_id" />
                                    <field name="product_id" column_invisible="1"/>
                                </tree>
                            </field>
                        </page>
                    </notebook>
                </sheet>
                <div class="oe_chatter">
                        <field name="message_follower_ids"/>
                        <field name="activity_ids"/>
                        <field name="message_ids"/>
                    </div>
            </form>
        </field>
    </record>

Important:

✔️ message​​_ids comes from the mail.thread mixin

✔️ The widget "mail_thread" displays the chatter panel


Update Your Manifest


Make sure your view files are included and added depends to model mail to succesfully inherit the mixin:

{
    'name': 'My Custom Module',
    'version': '17.0.1.',
    'summary': 'A simple custom module example for Odoo 17',
    'author': 'Your Name',
    'depends': ['base',​'product','mail'],
    'data': [
        'security/ir.model.access.csv',

        'views/product_views.xml',​
        'views/genre_views.xml',
        'views/product_category.xml',
    ],
    'installable': True,
    'application': True,
}

Upgrade Your Module


After adding the model mixins and XML code:

  • Update your module from Apps → Upgrade
  • Or use terminal:
./odoo-bin -c your.conf -u your_custom_module

Now you will see the Chatter panel on your form view!


Testing Your Chatter


After installing/updating your module:

  1. Create a new book record
  2. Check if the chatter appears at the bottom of the form
  3. Test messaging: Type a message and send
  4. Test following: Click the follow/unfollow button
  5. Test activities: Schedule an activity
  6. Test tracking: Change a field with tracking=True and see the log


Common Issues and Solutions


Problem: Chatter not appearing

Solution:

  • Check if you added _inherit = ['mail.thread', 'mail.activity.mixin']
  • Verify the chatter div is in your form view
  • Ensure 'mail' is in your module dependencies

Problem: Field changes not logged

Solution:

  • Add tracking=True to the fields you want to track
  • Restart and update your module


Conclusion


Adding chatter to your custom models is incredibly simple but massively powerful. With just two mixins and a view update, you transform a basic data model into a collaborative workspace.The chatter turns static records into living documents where teams can communicate, track progress, and maintain complete histories - exactly what makes Odoo such a powerful business platform.


How to Add Chatter (Messages) to Your Custom Module in Odoo 17
Widuri Sugiyani November 20, 2025
Share this post
Archive