Odoo Mindscape. Understand Odoo faster. Explore modules, fields, dependencies and version differences in one place instead of digging through the source code.

Module: SMS gateway

Entity: mail.message

Compute Method: _compute_has_sms_error

Inputs Method Outputs
sms_error_from_notification = self.env['mail.notification'].sudo().search([
            ('notification_type', '=', 'sms'),
            ('mail_message_id', 'in', self.ids),
            ('notification_status', '=', 'exception')]).mapped('mail_message_id')
for message in self:
            message.has_sms_error = message in sms_error_from_notification

Back to entity