[FIX] crm_lead: message_new now uses the on_change_partner_id to set the contact info of the partner, if the partner has been found during the gateway process.

bzr revid: tde@openerp.com-20130130125333-ebiwvimltamasj49
This commit is contained in:
Thibault Delavallée
2013-01-30 13:53:33 +01:00
+2
View File
@@ -983,6 +983,8 @@ class crm_lead(base_stage, format_address, osv.osv):
'partner_id': msg.get('author_id', False),
'user_id': False,
}
if msg.get('author_id'):
defaults.update(self.on_change_partner(cr, uid, None, msg.get('author_id'), context=context)['value'])
if msg.get('priority') in dict(crm.AVAILABLE_PRIORITIES):
defaults['priority'] = msg.get('priority')
defaults.update(custom_values)