diff options
| author | Olivier Dony <odo@openerp.com> | 2016-02-24 11:06:21 +0100 |
|---|---|---|
| committer | Olivier Dony <odo@openerp.com> | 2016-02-26 18:56:49 +0100 |
| commit | 602f3423c1fe43ba1af93a05bd5ed2fd76c8f3e9 (patch) | |
| tree | af463297ee3f8ec41ef12767ddc5735c19a1513b | |
| parent | c5b879bfd29a972d8b8f8fb95038694ac8bdc485 (diff) | |
[FIX] crm.activity.report: consider all messages as activities
When counting the 'activities' on each opportunity/lead,
this view only considered messages with a subtype that
matched the subtype of a specific crm.activity.
This was not consistent with the crm.opportunity.report
which counted *all* messages on an opportunity as
"activitiy entries".
The latter is considered better because any entry,
(even automated one for tracking field value changes
or automated system responses) corresponds to an "action"
taken on that record.
This patch makes crm.activity.report consistent with
this decision: it will now count all messages.
+ also convert the incorrect `left join` to a plain
[inner] `join`, as we don't want deleted leads to
appear in case orphan messages were left around
(which should not happen anyway).
| -rw-r--r-- | addons/crm/report/crm_activity_report.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/addons/crm/report/crm_activity_report.py b/addons/crm/report/crm_activity_report.py index 5bf4445fc72..ae7ac6621e0 100644 --- a/addons/crm/report/crm_activity_report.py +++ b/addons/crm/report/crm_activity_report.py @@ -44,14 +44,10 @@ class crm_activity_report(models.Model): l.type as lead_type from "mail_message" m - left join + join "crm_lead" l on (m.res_id = l.id) - inner join - "crm_activity" a - on - (m.subtype_id = a.subtype_id) WHERE (m.model = 'crm.lead') )""") |
