Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[FIX] mail: allow to update main attachment
When replying on a document they cannot read (notably when being notified) ACLs raise when trying to check if 'main_attachment_id' is already set before updating it. This is fixed in this commit. This fixes the recently introduced 'test_post_wo_access' test that does not pass without this fix. Note that the update of 'main_attachment_id' was already done in sudo. As all read or update access is now done in sudo, better call the whole method as sudo in 'message_post' and let '_message_set_main_attachment_id' works on the given record set environment. Task-3213982 (Mail: fix 'multi-company' post support) Part-of: odoo#114175
- Loading branch information