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_won_status

View 20.0
Inputs Method Outputs
  • probability
  • stage_id
  • stage_id.is_won
  • active
+ for lead in self:
+             if lead.probability == 100 and lead.stage_id.is_won:
+                 lead.won_status = 'won'
+             elif not lead.active and lead.probability == 0:
+                 lead.won_status = 'lost'
+             else:
+                 lead.won_status = 'pending'
  • won_status

Back to entity