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.team.member

Compute Method: _compute_lead_month_count

Inputs Method Outputs
  • user_id
  • user_id.id
  • crm_team_id
  • crm_team_id.id
month_date = fields.Datetime.now() - datetime.timedelta(days=30)
monthly_leads_counts = self._get_lead_from_date(month_date)
for member in self:
            member.lead_month_count = monthly_leads_counts.get((member.user_id.id, member.crm_team_id.id), 0)

Back to entity