[FIX] base: default partner email
In a lead: - Fill in contact information (phone, address, email...) - Create a new contact All information is copied to the new contact, except the email. opw-706711
This commit is contained in:
@@ -618,7 +618,7 @@ class Partner(models.Model, FormatAddress):
|
||||
raise UserError(_("Couldn't create contact without email address!"))
|
||||
if not name and email:
|
||||
name = email
|
||||
partner = self.create({self._rec_name: name or email, 'email': email or False})
|
||||
partner = self.create({self._rec_name: name or email, 'email': email or self.env.context.get('default_email', False)})
|
||||
return partner.name_get()[0]
|
||||
|
||||
@api.model
|
||||
|
||||
Reference in New Issue
Block a user