The message and activity features
Odoo has available global messaging and activity planning features, provided by the Discuss application, with technical name mail.
The mail module provides the mail.thread
abstract class that makes it simple to add the messaging features to any model, and the mail.activity.mixin
that adds planned activity features. This was done in Chapter 4, Extending Modules, to explain how to inherit features from mixin abstract classes.
To add these features, we need to add the mail dependency to the add-on module, library_checkout
, and then have the library checkout model class inherit from the abstract classes providing the following features.
Edit the 'depends'
key in the library_checkout/__manifest__.py
file, to add the mail module, shown as follows:
'depends': ['library_member', 'mail'],
And edit the library_checkout/models/library_checkout.py
file to inherit from the mixin abstract models, shown as follows:
class Checkout(models.Model): _name = 'library.checkout...