Impacted versions:

8.0

Steps to reproduce:

To reproduce this one, you have to configure outgoing and incoming server and mail aliases

see https://youtu.be/-HzDGh9C9Jc

Current behavior:

If you add a user which has no acces on a object (purchase.order in this case) as follower on a record of this object **AFTER someone has responded by email on this record**, and if you send an message on this record, an exception is raised at the connection of the user added as a follower.

Expected behavior:

No exceptions should be raised at the connection of the user added as a follower.

Video/Screenshot link (optional):

https://youtu.be/-HzDGh9C9Jc

""" Post-processing on values given by message_read. This method will
            handle partners in batch to avoid doing numerous queries.
            :param list messages: list of message, as get_dict result
            :param dict message_tree: {[msg.id]: msg browse record}
        """
        res_partner_obj = self.pool.get('res.partner')
        ir_attachment_obj = self.pool.get('ir.attachment')
        pid = self.pool['res.users'].browse(cr, SUPERUSER_ID, uid, context=context).partner_id.id
        
        partner_ids = set()
        attachment_ids = set()
        for key, message in message_tree.iteritems():
            if message.author_id:
                partner_ids |= set([message.author_id.id])
            if message.subtype_id and message.notified_partner_ids:  
                partner_ids |= set([partner.id for partner in message.notified_partner_ids])
            elif not message.subtype_id and message.partner_ids:  
                partner_ids |= set([partner.id for partner in message.partner_ids])
            if message.attachment_ids:
                attachment_ids |= set([attachment.id for attachment in message.attachment_ids])
        
        partners = res_partner_obj.name_get(cr, SUPERUSER_ID, list(partner_ids), context=context)
        partner_tree = dict((partner[0], partner) for partner in partners)
        
        attachments = ir_attachment_obj.read(cr, SUPERUSER_ID, list(attachment_ids), ['id', 'datas_fname', 'name', 'file_type_icon'], context=context)
        attachments_tree = dict((attachment['id'], {
            'id': attachment['id'],
            'filename': attachment['datas_fname'],
            'name': attachment['name'],