(self, emails, link_mail=False)
return result
Convert a list of emails into a list partner_ids and a list
            new_partner_ids. The return value is non conventional because
            it is meant to be used by the mail widget.

            :return dict: partner_ids and new_partner_ids
Convert a list of emails into a list partner_ids and a list
            new_partner_ids. The return value is non conventional because
            it is meant to be used by the mail widget.
Convert a list of emails into a list partner_ids and a list new_partner_ids . The return value is non conventional because it is meant to be used by the mail widget .
def _message_partner_info_from_emails(self, emails, link_mail=False):
        """ Convert a list of emails into a list partner_ids and a list
            new_partner_ids. The return value is non conventional because
            it is meant to be used by the mail widget.

            :return dict: partner_ids and new_partner_ids """
        self.ensure_one()
        MailMessage = self.env['mail.message'].sudo()
        partners = self._mail_find_partner_from_emails(emails, records=self)
        result = list()
        for idx, contact in enumerate(emails):
            partner = partners[idx]
            partner_info = {'full_name': partner.email_formatted if partner else contact, 'partner_id': partner.id}
            result.append(partner_info)
            # link mail with this from mail to the new partner id
            if link_mail and partner:
                MailMessage.search([
                    ('email_from', '=ilike', partner.email_normalized),
                    ('author_id', '=', False)
                ]).write({'author_id': partner.id})
        return result
def _message_partner_info_from_emails ( self , emails , link_mail = False ) : self . ensure_one ( ) MailMessage = self . env [ 'mail.message' ] . sudo ( ) partners = self . _mail_find_partner_from_emails ( emails , records = self ) result = list ( ) for idx , contact in enumerate ( emails ) : partner = partners [ idx ] partner_info = { 'full_name' : partner . email_formatted if partner else contact , 'partner_id' : partner . id } result . append ( partner_info ) # link mail with this from mail to the new partner id if link_mail and partner : MailMessage . search ( [ ( 'email_from' , '=ilike' , partner . email_normalized ) , ( 'author_id' , '=' , False ) ] ) . write ( { 'author_id' : partner . id } ) return result