[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:
ron@tinyerp.com 2011-11-02 12:57:21 +05:30
parent 1e1b32833e
commit f9550c9f2c
2 changed files with 5 additions and 5 deletions

View File

@ -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)

View File

@ -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()