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: ir.model

Compute Method: _compute_is_mail_thread_sms

Inputs Method Outputs
  • is_mail_thread
  • model
for model in self:
            if model.is_mail_thread:
                ModelObject = self.env[model.model]
                potential_fields = ModelObject._phone_get_number_fields() + ModelObject._mail_get_partner_fields()
                if any(fname in ModelObject._fields for fname in potential_fields):
                    model.is_mail_thread_sms = True
                    continue
            model.is_mail_thread_sms = False

Back to entity