From 8104140f40409166e1f1bcb184311b8e4385cb3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Theys?= Date: Fri, 10 Jun 2022 14:18:46 +0000 Subject: [PATCH] [FIX] mail: auto reload form on attachment changed through activity MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Before this commit the feature to auto-reload on attachment changed only worked through composer or attachment box, now also works with "upload file" activity. closes odoo/odoo#93486 X-original-commit: 4ab3cb40b09f2c7278bea3bf1136b9ebf6dadc0e Signed-off-by: Sébastien Theys (seb) Signed-off-by: Alexandre Kühn (aku) --- addons/mail/static/src/models/file_uploader.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/addons/mail/static/src/models/file_uploader.js b/addons/mail/static/src/models/file_uploader.js index 5a30614c822..d3c422edb7a 100644 --- a/addons/mail/static/src/models/file_uploader.js +++ b/addons/mail/static/src/models/file_uploader.js @@ -126,7 +126,11 @@ registerModel({ async _performUpload({ files }) { const composer = this.composerView && this.composerView.composer; // save before async const thread = this.thread; // save before async - const chatter = this.chatterOwner || this.attachmentBoxView && this.attachmentBoxView.chatter; // save before async + const chatter = ( + (this.chatterOwner) || + (this.attachmentBoxView && this.attachmentBoxView.chatter) || + (this.activityView && this.activityView.activityBoxView.chatter) + ); // save before async const activity = this.activityView && this.activityView.activity; // save before async const uploadingAttachments = new Map(); for (const file of files) {