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

Module: Website, event and CRM integration

Entity: crm.lead

Compute Method: _compute_auto_invite_warning

Inputs Method Outputs
  • company_id
  • company_id.id
"""Used for warning purposes in the lead/opportunity form view"""
self.auto_invite_warning = False
for lead in self.filtered("event_type_website_url"):
            # If there's no website for the lead/opportunity company we'll warn the user
            # that the invitation won't be sent.
            website = lead.company_id and self.env["website"].search(
                [("company_id", "=", lead.company_id.id)]
            )
            if not lead.company_id or not website:
                lead.auto_invite_warning = True

Back to entity