[FIX, REF] crm : Fixed Tracback for converting phonecall to partner from wizard and donot need to loop for create partner so removed it
bzr revid: ron@tinyerp.com-20111102072721-xeq9ofkve0n8lk79
This commit is contained in:
parent
1e1b32833e
commit
f9550c9f2c
|
@ -197,7 +197,6 @@ class crm_phonecall(crm_base, osv.osv):
|
|||
context = {}
|
||||
partner_ids = {}
|
||||
for call in self.browse(cr, uid, ids, context=context):
|
||||
partner_id = call.partner_id and call.partner_id.id or False
|
||||
if action == 'create':
|
||||
if not partner_id:
|
||||
partner_id = self._call_create_partner(cr, uid, call, context=context)
|
||||
|
|
|
@ -61,11 +61,12 @@ class crm_phonecall2partner(osv.osv_memory):
|
|||
if context is None:
|
||||
context = {}
|
||||
phonecall = self.pool.get('crm.phonecall')
|
||||
|
||||
data = self.browse(cr, uid, ids, context=context)[0]
|
||||
call_ids = context and context.get('active_ids') or []
|
||||
for data in self.browse(cr, uid, ids, context=context):
|
||||
partner_id = data.partner_id and data.partner_id.id or False
|
||||
partner_ids += phonecall.convert_partner(cr, uid, call_ids, data.action, partner_id, context=context)
|
||||
return partner_ids
|
||||
partner_id = data.partner_id and data.partner_id.id or False
|
||||
partner_ids = phonecall.convert_partner(cr, uid, call_ids, data.action, partner_id, context=context)
|
||||
return partner_ids[call_ids[0]]
|
||||
|
||||
crm_phonecall2partner()
|
||||
|
||||
|
|
Loading…
Reference in New Issue