Managing activities on documents
When using chatter, you can also add activities. These are used to plan your actions on the record. It is kind of a to-do list for each record. In this recipe, you will learn how to enable activities on any model.
Getting ready
For this recipe, we will be using the my_hostel
module from the previous recipe, Managing chatter on documents. We will add activities to the hostel.student
model.
How to do it...
Follow these steps to add activities to the hostel.student
model:
- Inherit
mail.activity.mixin
in the Python definition of thehostel.student
model:class HostelStudent(models.Model): _name = "hostel.student" _description = "Hostel Student Information" _inherit = ['mail.thread', 'mail.activity.mixin'] ...
- Add the
mail_activity
widget in the chatter of thehostel.student
model:... <div class="oe_chatter"> ...