summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js/models/threads/document_thread.js
diff options
context:
space:
mode:
authorThanh Dodeur <tso@odoo.com>2018-12-21 08:29:59 +0000
committerThanh Dodeur <tso@odoo.com>2018-12-21 15:25:27 +0000
commit73d9b9588f24788766c66aacd69ed436bb0223f4 (patch)
treec6a66d81c60a66be16da594c9c87146af80d000a /addons/mail/static/src/js/models/threads/document_thread.js
parent5545787e2ce1dc4e4b151bd8d21731012f5b8527 (diff)
[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
Diffstat (limited to 'addons/mail/static/src/js/models/threads/document_thread.js')
-rw-r--r--addons/mail/static/src/js/models/threads/document_thread.js8
1 files changed, 8 insertions, 0 deletions
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
@@ -157,6 +157,14 @@ var DocumentThread = Thread.extend({
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
*
* Useful in order to handle message history of the document thread,