From 0703c5d50601734625cd7d60052040947ca3a64d Mon Sep 17 00:00:00 2001 From: Thibault Francois Date: Tue, 29 Mar 2011 15:40:22 +0200 Subject: [PATCH] [IMP, FIX] partner look up, only name =, convert merge only with one opp, don't merge cancelled and done, fix history loss, take info from oldest opp bzr revid: tfr@openerp.com-20110329134022-80wkml8mbgwp9igy --- addons/crm/wizard/crm_merge_opportunities.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/addons/crm/wizard/crm_merge_opportunities.py b/addons/crm/wizard/crm_merge_opportunities.py index 5bcd14ee6c6..e9a957bcf24 100644 --- a/addons/crm/wizard/crm_merge_opportunities.py +++ b/addons/crm/wizard/crm_merge_opportunities.py @@ -130,11 +130,12 @@ class crm_merge_opportunity(osv.osv_memory): } #copy message into the first opportunity + merge attachement - for opp in tail_opportunities: + + for opp in tail_opportunities + [first_opportunity]: attach_ids = self.get_attachments(cr, uid, opp, context=context) self.set_attachements_res_id(cr, uid, first_opportunity.id, attach_ids) for history in opp.message_ids: - new_history = message_obj.copy(cr, uid, history.id, default={'res_id': first_opportunity.id, 'name' : _("From %s : %s") % (opp.name, history.name) }) + new_history = message_obj.write(cr, uid, history.id, {'res_id': first_opportunity.id, 'name' : _("From %s : %s") % (opp.name, history.name) }, context=context) #Notification about loss of information details = []