summaryrefslogtreecommitdiff
path: root/addons/mail/static/src/js
diff options
context:
space:
mode:
authorjvm-odoo <jvm@odoo.com>2020-05-06 10:07:23 +0000
committerjvm-odoo <jvm@odoo.com>2020-05-07 09:33:52 +0000
commit1159dcadbff09db464c13af96e54d259395662ea (patch)
treeb04fefade288f82ad8b516eee2b887447beab2c9 /addons/mail/static/src/js
parent513c6d18dfbabf6bf0dc930b457f34ff94b71cac (diff)
[FIX] mail: fix "open_attachments" option's attachments not loaded
Issue - Install Recruitment - Go on any application - Add an attachment - Go back, refresh - Returns on the application The attachment box is open but the attachments are not loaded. You must toggle it again to load them. Cause When opening the box, this.attachments is empty so no attachments are shown. Solution Load the attachments if the option is present. It will not cause supplementary RPCs thanks to "_areAttachmentsLoaded" OPW-2246116 closes odoo/odoo#50825 X-original-commit: 40cea06301505f0f931b5cfce1da0f05760f8dcc Signed-off-by: Jason Van Malder (jvm) <jvm@odoo.com>
Diffstat (limited to 'addons/mail/static/src/js')
-rw-r--r--addons/mail/static/src/js/chatter.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/addons/mail/static/src/js/chatter.js b/addons/mail/static/src/js/chatter.js
index 92dbe515a27..2b7186a46e3 100644
--- a/addons/mail/static/src/js/chatter.js
+++ b/addons/mail/static/src/js/chatter.js
@@ -110,7 +110,7 @@ var Chatter = Widget.extend({
.then(this._updateMentionSuggestions.bind(this))
.then(() => {
if (this.openAttachments) {
- this._openAttachmentBox();
+ this._fetchAttachments().then(() => this._openAttachmentBox());
}
});