From ebf8c735cf1c0c06b3ae332acf0d764fc75ebeee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=A9my=20Hennecart?= Date: Wed, 13 Oct 2021 08:41:08 +0000 Subject: [PATCH] [FIX] crm: display only events linked to the actual opportunity When an user clicks on the Meeting tab to open the calendar, it should onyl display the events linked to the opportunity. task-2665863 closes odoo/odoo#79860 X-original-commit: 5a6e6e9fdd5bc85e8c79c09ef17b63bf4b95dd39 Signed-off-by: Thibault Delavallee (tde) --- addons/crm/models/crm_lead.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/crm/models/crm_lead.py b/addons/crm/models/crm_lead.py index 25d0b19d9c2..bb2f594c5d9 100644 --- a/addons/crm/models/crm_lead.py +++ b/addons/crm/models/crm_lead.py @@ -1034,6 +1034,7 @@ class Lead(models.Model): partner_ids.append(self.partner_id.id) current_opportunity_id = self.id if self.type == 'opportunity' else False action['context'] = { + 'search_default_opportunity_id': current_opportunity_id, 'default_opportunity_id': current_opportunity_id, 'default_partner_id': self.partner_id.id, 'default_partner_ids': partner_ids,