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 field is added in the library.book.rent model through inheritance.

Activities can be of different types. By default, you can create activities with types such as Email, Call, Meeting, and To-Do. If you want to add your own activity type, you can do it by going to Settings|Technical|Email|Activity Types in developer mode.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset