From ab65c388cdab762db0185463c66b2b291c2a8e24 Mon Sep 17 00:00:00 2001 From: Martin Trigaux Date: Thu, 23 Apr 2015 09:54:50 +0200 Subject: [PATCH] [FIX] crm: list of meetings from opportunity When opening the list of meetings from an opportunity, show only the meetings linked to the current opportunity. Use search_default_ to be able to remove the filter if not needed. Remove context on meeting button as it's ignored in action_makeMeeting (and there is no field attendee_id linked to a crm.lead anyway) opw 614039 --- addons/crm/crm_lead.py | 1 + addons/crm/crm_lead_view.xml | 3 +-- addons/crm/crm_meeting_menu.xml | 11 +++++++++++ 3 files changed, 13 insertions(+), 2 deletions(-) diff --git a/addons/crm/crm_lead.py b/addons/crm/crm_lead.py index 5d238b9a26c..e272eca1d2f 100644 --- a/addons/crm/crm_lead.py +++ b/addons/crm/crm_lead.py @@ -930,6 +930,7 @@ class crm_lead(base_stage, format_address, osv.osv): opportunity = self.browse(cr, uid, ids[0], context) res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid, 'base_calendar', 'action_crm_meeting', context) res['context'] = { + 'search_default_opportunity_id': opportunity.id, 'default_opportunity_id': opportunity.id, 'default_partner_id': opportunity.partner_id and opportunity.partner_id.id or False, 'default_partner_ids' : opportunity.partner_id and [opportunity.partner_id.id] or False, diff --git a/addons/crm/crm_lead_view.xml b/addons/crm/crm_lead_view.xml index e0311d1db40..651735b432a 100644 --- a/addons/crm/crm_lead_view.xml +++ b/addons/crm/crm_lead_view.xml @@ -392,8 +392,7 @@ type="action"/>