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

Module: Email Marketing

Entity: mailing.contact

Compute Method: _compute_opt_out

Inputs Method Outputs
if active_list_id := self._get_context_active_list_id():
            for record in self:
                active_subscription_list = record.subscription_ids.filtered(lambda l: l.list_id.id == active_list_id)
                record.opt_out = active_subscription_list.opt_out
        else:
            for record in self:
                record.opt_out = False

Back to entity