[FIX] crm: fixed a bug in opportunities merge.

_merge_notify was called with a browse record but was waiting for an ID.

bzr revid: tde@openerp.com-20130827162036-v7yhfijgpdhcyte5
This commit is contained in:
Thibault Delavallée 2013-08-27 18:20:36 +02:00
parent 3b88ba87c1
commit 9825eef774
1 changed files with 1 additions and 1 deletions

View File

@ -662,7 +662,7 @@ class crm_lead(base_stage, format_address, osv.osv):
# Merge notifications about loss of information
opportunities = [highest]
opportunities.extend(opportunities_rest)
self._merge_notify(cr, uid, highest, opportunities, context=context)
self._merge_notify(cr, uid, highest.id, opportunities, context=context)
# Check if the stage is in the stages of the sales team. If not, assign the stage with the lowest sequence
if merged_data.get('section_id'):
section_stage_ids = self.pool.get('crm.case.stage').search(cr, uid, [('section_ids', 'in', merged_data['section_id']), ('type', '=', merged_data.get('type'))], order='sequence', context=context)