From 9d2f48dc7fa9d5de3e850ff7ac82d9b31cf188cd Mon Sep 17 00:00:00 2001 From: Nicolas Martinelli Date: Fri, 26 May 2017 16:59:50 +0200 Subject: [PATCH] [FIX] crm: expected closing The "exp. closing" dashboard button takes into account the won opportunities. It shouldn't. opw-744940 --- addons/crm/models/crm_lead.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/addons/crm/models/crm_lead.py b/addons/crm/models/crm_lead.py index 22d3eb6670d..b61f7b60811 100644 --- a/addons/crm/models/crm_lead.py +++ b/addons/crm/models/crm_lead.py @@ -922,7 +922,7 @@ class Lead(FormatAddress, models.Model): result['closing']['today'] += 1 if date.today() <= date_deadline <= date.today() + timedelta(days=7): result['closing']['next_7_days'] += 1 - if date_deadline < date.today(): + if date_deadline < date.today() and not opp.date_closed: result['closing']['overdue'] += 1 # Next activities if opp.next_activity_id and opp.date_action: