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

""" Access rules of mail.message:
            - read: if
                - author_id == pid, uid is the author, OR
                - mail_notification (id, pid) exists, uid has been notified, OR
                - uid have read access to the related document if model, res_id
                - otherwise: raise
            - create: if
                - no model, no res_id, I create a private message OR
                - pid in message_follower_ids if model, res_id OR
                - mail_notification (parent_id.id, pid) exists, uid has been notified of the parent, OR
                - uid have write or create access on the related document if model, res_id, OR
                - otherwise: raise
            - write: if
                - author_id == pid, uid is the author, OR
                - uid has write or create access on the related document if model, res_id
                - otherwise: raise
            - unlink: if
                - uid has write or create access on the related document if model, res_id
                - otherwise: raise
        """
        def _generate_model_record_ids(msg_val, msg_ids):