Managing chatter on documents
In this recipe, you will learn how to manage chatter on your documents and add a communication thread to a record.
Getting ready
For this recipe, we will reuse the my_hostel
module from Chapter 8, Advanced Server-Side Development Techniques. You can grab an initial copy of the module from the Chapter23/ 00_initial_module
directory of the GitHub repository for this hostel room. In this recipe, we will add chatter to the hostel.student
model.
How to do it...
Follow these steps to add chatter on the records of the hostel.student
model:
- Add the
mail
module dependency in the__manifest__.py
file:... 'depends': ['mail'], ...
- Inherit
mail.thread
in the Python definition of thehostel.student
model:class HostelStudent(models.Model): _name = "hostel.student" _description = "Hostel Student Information" _inherit = ['mail.thread'] ...
- Add...