[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
This commit is contained in:
parent
cb5f00f580
commit
ab65c388cd
|
@ -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,
|
||||
|
|
|
@ -392,8 +392,7 @@
|
|||
type="action"/>
|
||||
<button string="Meeting"
|
||||
name="action_makeMeeting"
|
||||
type="object"
|
||||
context="{'search_default_attendee_id': active_id, 'default_attendee_id' : active_id}"/>
|
||||
type="object" />
|
||||
</div>
|
||||
<div class="oe_title">
|
||||
<label for="name" class="oe_edit_only"/>
|
||||
|
|
|
@ -5,5 +5,16 @@
|
|||
<menuitem name="Import & Synchronize" id="base.menu_import_crm"
|
||||
parent="base.menu_base_partner"/>
|
||||
|
||||
<record id="view_crm_meeting_search" model="ir.ui.view">
|
||||
<field name="name">CRM - Meetings Search</field>
|
||||
<field name="model">crm.meeting</field>
|
||||
<field name="inherit_id" ref="base_calendar.view_crm_meeting_search"/>
|
||||
<field name="arch" type="xml">
|
||||
<xpath expr="//field[@name='user_id']" position="after">
|
||||
<field name="opportunity_id"/>
|
||||
</xpath>
|
||||
</field>
|
||||
</record>
|
||||
|
||||
</data>
|
||||
</openerp>
|
||||
|
|
Loading…
Reference in New Issue