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

Module: CRM location

Entity: crm.lead

Compute Method: _compute_location_id

View 18.0 View 19.0
Inputs Method Outputs
  • partner_id
  • partner_id.zip_id
  • partner_id.zip_id.id
  • location_id
  • location_id.id
for lead in self:
            if lead.partner_id.zip_id:
                lead.location_id = lead.partner_id.zip_id.id
            elif lead.location_id:
                lead.location_id = lead.location_id.id
  • location_id

Back to entity