Skip to content
Snippets Groups Projects
Commit 325aaebc authored by Huy's avatar Huy Committed by Thibault Delavallée
Browse files

[FIX] website_crm: skip archived visitors in stat button


Currently stat button on crm.lead form view still shows page views count of
archived visitor records. This is not coherent with the action performed
when clicking which filters out archived records.

We now correctly count only active visitors page count.

closes odoo/odoo#87447

Signed-off-by: default avatarThibault Delavallee (tde) <tde@openerp.com>
parent b54f78de
Branches
Tags
No related merge requests found
......@@ -20,7 +20,7 @@ class Lead(models.Model):
JOIN crm_lead_website_visitor_rel lv ON l.id = lv.crm_lead_id
JOIN website_visitor v ON v.id = lv.website_visitor_id
JOIN website_track p ON p.visitor_id = v.id
WHERE l.id in %s
WHERE l.id in %s AND v.active = TRUE
GROUP BY l.id"""
self.env.cr.execute(sql, (tuple(self.ids),))
page_data = self.env.cr.dictfetchall()
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment