[FIX] crm: fix bug introduced by new api in #aa44700
Before migration: 'phone': customer and customer.phone or lead.phone, After migration: 'phone': customer.phone if customer else self.phone, So if a customer exists and that it has no phone, the phone on the lead need to be preserved during convertion in opp.
This commit is contained in:
@@ -689,8 +689,8 @@ class Lead(FormatAddress, models.Model):
|
||||
'partner_id': customer.id if customer else False,
|
||||
'type': 'opportunity',
|
||||
'date_open': fields.Datetime.now(),
|
||||
'email_from': customer.email if customer else self.email_from,
|
||||
'phone': customer.phone if customer else self.phone,
|
||||
'email_from': customer and customer.email or self.email_from,
|
||||
'phone': customer and customer.phone or self.phone,
|
||||
'date_conversion': fields.Datetime.now(),
|
||||
}
|
||||
if not self.stage_id:
|
||||
|
||||
Reference in New Issue
Block a user