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

Module: Checkout Newsletter

Entity: res.config.settings

Compute Method: _compute_is_newsletter_enabled

Inputs Method Outputs
  • website_id
  • website_id.id
"""
        Computing newsletter setting when changing the website in the res.config.settings page to
        show the correct value in the checkbox.
        """
for record in self:
            website = record.with_context(website_id=record.website_id.id).website_id
            record.is_newsletter_enabled = website.is_view_active(
                'website_sale_mass_mailing.newsletter'
            )

Back to entity