From 73d9b9588f24788766c66aacd69ed436bb0223f4 Mon Sep 17 00:00:00 2001 From: Thanh Dodeur Date: Fri, 21 Dec 2018 08:29:59 +0000 Subject: [IMP] mail: adds delete and upload to chatter This commit adds the ability to upload and delete attachments from the chatter. Task: #1911277 closes odoo/odoo#29702 --- addons/mail/static/src/js/models/threads/document_thread.js | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'addons/mail/static/src/js/models/threads/document_thread.js') diff --git a/addons/mail/static/src/js/models/threads/document_thread.js b/addons/mail/static/src/js/models/threads/document_thread.js index d902d69765c..6c15b39d25e 100644 --- a/addons/mail/static/src/js/models/threads/document_thread.js +++ b/addons/mail/static/src/js/models/threads/document_thread.js @@ -156,6 +156,14 @@ var DocumentThread = Thread.extend({ isLinkedToDocument: function () { return true; }, + /** + * @param {integer[]} attachmentIDs + */ + removeAttachmentsFromMessages: function (attachmentIDs) { + _.each(this.getMessages(), function (message) { + message.removeAttachments(attachmentIDs); + }); + }, /** * Set list of message IDs of this document thread * -- cgit v1.2.3