[IMP] improve code.
bzr revid: nco@tinyerp.com-20130529130559-neom3q6ndlr1rxav
This commit is contained in:
parent
e9fbcae722
commit
cdfc564974
|
@ -257,16 +257,18 @@ class crm_phonecall(base_state, osv.osv):
|
|||
Open meeting's calendar view to schedule a meeting on current phonecall.
|
||||
:return dict: dictionary value for created meeting view
|
||||
"""
|
||||
partner_ids = []
|
||||
phonecall = self.browse(cr, uid, ids[0], context)
|
||||
if phonecall.partner_id and phonecall.partner_id.email:
|
||||
partner_ids.append(phonecall.partner_id.id)
|
||||
res = self.pool.get('ir.actions.act_window').for_xml_id(cr, uid, 'base_calendar', 'action_crm_meeting', context)
|
||||
res['context'] = {
|
||||
'default_phonecall_id': phonecall.id,
|
||||
'default_partner_ids': partner_ids or False,
|
||||
'default_user_id': uid,
|
||||
'default_email_from': phonecall.email_from,
|
||||
'default_name': phonecall.name,
|
||||
}
|
||||
if phonecall.partner_id and phonecall.partner_id.email:
|
||||
res['context']['default_partner_ids']= [phonecall.partner_id] and [phonecall.partner_id.id] or False
|
||||
return res
|
||||
|
||||
def action_button_convert2opportunity(self, cr, uid, ids, context=None):
|
||||
|
|
Loading…
Reference in New Issue