Follow these steps to add activities on the library.book.rent model:
- Inherit mail.activity.mixin in the Python definition of the library.book.rent model:
class LibraryBookRent(models.Model):
_name = 'library.book.rent'
_inherit = ['mail.thread', 'mail.activity.mixin']
...
- Add mail_activity widgets in the chatter of the library.book.rent model:
...
<div class="oe_chatter">
<field name="message_follower_ids" widget="mail_followers"/>
<field name="activity_ids" widget="mail_activity"/>
<field name="message_ids" widget="mail_thread"/>
</div>
...
Update the my_library module to apply the changes. This will display chatter activities:
This is how the user will be able to manage different chatter activities. Note that an activity scheduled by one user is visible to all other users too.