From a6e96c256ded6bb764d1ab469878ef780ecdbe3c Mon Sep 17 00:00:00 2001 From: Thanh Dodeur Date: Thu, 26 Mar 2020 09:10:45 +0000 Subject: [PATCH] [FIX] mail: fetches the attachments checksum for cache control. This commit makes so that we also fetch the checksum of the attachments of mail.messages to use it for cache control. Before this commit, the urls of message attachments had `undefined` for the signature parameter. --- addons/mail/models/mail_message.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/mail/models/mail_message.py b/addons/mail/models/mail_message.py index cb5b71d10b8..f17852b203d 100644 --- a/addons/mail/models/mail_message.py +++ b/addons/mail/models/mail_message.py @@ -977,6 +977,7 @@ class Message(models.Model): attachment_ids = [] for attachment in message_sudo.attachment_ids: attachment_ids.append({ + 'checksum': attachment.checksum, 'id': attachment.id, 'filename': attachment.name, 'name': attachment.name,