- Debug mode,
- Add multi-company to admin (user id 2),
- Create new company (company 2)
- Activate res.partner multi-company record rule
- Create invoice
- with first company (the default one)
- with a customer having an email address that doesn't exist
- Send a message in the thread, making sure the customer is in the
follower
- Wait for the message to bounce (red mail icon in the thread on the
given message).
- Change user to company 2 (in the dropdown menu next to the user
dropdown menu in the upper right corner)
- Refresh, access error, even in the app switcher.
This is because Odoo tries to display in the notifications the email
that failed, and crashes because the user doesn't have access to the
partner of the email.
We filter out the notifications related to objects that the user doesn't
have access to.
opw-1924359
closesodoo/odoo#30348