[FIX] mail: allow guest to delete attachments
closes odoo/odoo#121256 Related: odoo/enterprise#41025 Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
This commit is contained in:
@@ -101,9 +101,13 @@ export class AttachmentService {
|
||||
async delete(attachment) {
|
||||
this.remove(attachment);
|
||||
if (attachment.id > 0) {
|
||||
await this.rpc("/mail/attachment/delete", {
|
||||
attachment_id: attachment.id,
|
||||
});
|
||||
await this.rpc(
|
||||
"/mail/attachment/delete",
|
||||
assignDefined(
|
||||
{ attachment_id: attachment.id },
|
||||
{ access_token: attachment.accessToken }
|
||||
)
|
||||
);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user