Skip to content
Snippets Groups Projects
Commit 1bcbd640 authored by Olivier Dony's avatar Olivier Dony Committed by Olivier Dony
Browse files

[FIX] mail, mass_mailing: fix attachment ownership


Attachments that are uploaded on a record that isn't saved yet are
created with res_id set to 0. In the case of attachments linked through
a m2m rather than the usual (res_model, res_id), it means they may not
be readable afer the creation of the record, except by their creator.

Re-attaching them to the mailing / template at the end of the create()
call fixes the ownership.

Fixes #81935

closes odoo/odoo#82106

X-original-commit: 3857629a
Signed-off-by: default avatarOlivier Dony <odo@odoo.com>
parent a48e3820
No related branches found
No related tags found
No related merge requests found
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment