Hey Cyllo folks, anyone know how to get real-time chatter working on a custom model? I'm stumped!
Welcome!
Share and discuss the best content and new marketing ideas, build your professional profile and become a better marketer together.
This question has been flagged
1
Reply
9
Views
Here's how to enable Chatter in your Odoo custom model. It's pretty straightforward once you know the key steps. Inherit from 'mail.thread' and/or 'mail.activity.mixin' (for activity creation) in your Python model. Add the '
' tag after the '' tag in your form view.
In Python,
from odoo import fields, models
class BookDetails(models.Model):
_name = 'library.book'
_inherit = ['mail.thread', 'mail.activity.mixin'] # Enables chatter features
name = fields.Char(string="Book Name", tracking=True) # Tracking enabled
author = fields.Char(string="Author")
isbn = fields.Char(string="ISBN")
In XML,
book.view.form
library.book