[FIX] res_partner: Meetings button on form view was not correctly
filtering displayed meetings according to the selected partner.
This commit is contained in:
parent
f5c60d482b
commit
32053a5bf3
|
@ -88,16 +88,11 @@ class res_partner(osv.osv):
|
||||||
return opportunity_ids
|
return opportunity_ids
|
||||||
|
|
||||||
def schedule_meeting(self, cr, uid, ids, context=None):
|
def schedule_meeting(self, cr, uid, ids, context=None):
|
||||||
if context is None:
|
|
||||||
context = {}
|
|
||||||
partner_ids = list(ids)
|
partner_ids = list(ids)
|
||||||
partner_ids.append(self.pool.get('res.users').browse(cr, uid, uid).partner_id.id)
|
partner_ids.append(self.pool.get('res.users').browse(cr, uid, uid).partner_id.id)
|
||||||
res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid, 'calendar', 'action_calendar_event', context)
|
res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid, 'calendar', 'action_calendar_event', context)
|
||||||
res['context'] = {
|
res['context'] = {
|
||||||
'default_partner_id': ids and ids[0] or False,
|
'search_default_partner_ids': list(ids),
|
||||||
'default_partner_ids': partner_ids,
|
'default_partner_ids': partner_ids,
|
||||||
}
|
}
|
||||||
return res
|
return res
|
||||||
|
|
||||||
|
|
||||||
# vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4:
|
|
||||||
|
|
Loading…
Reference in New Issue