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

Module: CRM

Entity: crm.lead

Compute Method: _compute_user_company_ids

Inputs Method Outputs
all_companies = self.env['res.company'].search([])
for lead in self:
            if not lead.company_id:
                lead.user_company_ids = all_companies
            else:
                lead.user_company_ids = lead.company_id

Back to entity