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_library
module from the previous recipe, Managing chatter on documents. We will add activities to the library.book.rent
model.
How to do it...
Follow these steps to add activities to the library.book.rent
model:
- Inherit
mail.activity.mixin
in the Python definition of thelibrary.book.rent
model:class LibraryBookRent(models.Model): _name = 'library.book.rent' _inherit = ['mail.thread', 'mail.activity.mixin'] ...
- Add the
mail_activity
widget in the chatter of thelibrary.book.rent
model:... <div class="oe_chatter"> <field name="message_follower_ids...