Sending periodic digest emails
The Odoo framework has built-in support for sending out periodic digest emails. With digest emails, you can send an email with information about business KPIs. In this recipe, we will send data about the hostel room to the rector (or any other authorized person).
Getting ready
For this recipe, we will be using the my_hostel
module from the previous recipe, Logging user changes in a chatter.
How to do it...
Follow these steps to generate digest emails for room rent records:
- Inherit the
digest.digest
model and add fields for the KPIs:class Digest(models.Model): _inherit = 'digest.digest' kpi_room_rent = fields.Boolean('Room Rent') kpi_room_rent_value = fields.Integer(compute='_compute_kpi_room_rent_value') def _compute_kpi_room_rent_value(self): for record in self: ...