When you read a record with the document viewer on the right side
that you don't have write access to this record
and the message_main_attachment_id was not yet set on the record
the document viewer try to set a value for message_main_attachment_id
that raise an access error
Set the value is not important but the popup
Access error can be really annoying
closesodoo/odoo#45378
X-original-commit: 74c36e6bc59af241ea162f042015f637880f1911
Signed-off-by: Quentin De Paoli (qdp) <qdp@openerp.com>