Odoo 12 Development Cookbook - Third Edition
by Parth Gajjar, Alexandre Fayolle, Holger Brunn, Daniel Reis
How it works...
Activities are part of the mail module and you can optionally enable them in chatter. In order to enable activities on records, you need to inherit mail.activity.mixin. Similar to the mail. thread model, mail.activity.mixin is also an abstract model. Inheriting mail.activity.mixin will add all the necessary fields and methods in the module. These methods and fields are used to manage activities on records. In step 1, we added mail.activity.mixin into the library.book.rent model. Because of this, the inheritance of library.book.rent will get all the methods and fields required to manage activities.
In step 2, we added the mail_activity widget in the form view. This will display the UI for managing activities. The activity_ids ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Read now
Unlock full access