diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index fd0b502a72c..1ff6e58bd24 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -669,9 +669,9 @@ class crm_lead(crm_case, osv.osv): value = {} if team_id: value['section_id'] = team_id - if index < len(user_ids): + if user_ids: value['user_id'] = user_ids[index] - index += 1 + index = (index + 1) % len(user_ids) if value: self.write(cr, uid, [lead_id], value, context=context) return True