From 6f8d9ab39b553e94e2fc74a149e127ceb39b9450 Mon Sep 17 00:00:00 2001 From: "Achraf (abz)" Date: Tue, 27 Oct 2020 14:09:10 +0000 Subject: [PATCH] [FIX] mail: Do not send log notes to customers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Issue - Install "CRM" - Create new lead - Set X to customer - Send a log note X receives log notes by mail Reproducible on Project and CRM Cause The customer sends a list of partners who will receive an email even when it is a log note Solution Send the list of partners only when it is an email and not a log note opw-2369280 closes odoo/odoo#60855 X-original-commit: 4e660dfdf40a36eed7123bcea2452874238fddd8 Signed-off-by: Sébastien Theys (seb) --- addons/mail/static/src/models/composer/composer.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/addons/mail/static/src/models/composer/composer.js b/addons/mail/static/src/models/composer/composer.js index 58bdb3c8b25..25052fd1b38 100644 --- a/addons/mail/static/src/models/composer/composer.js +++ b/addons/mail/static/src/models/composer/composer.js @@ -174,7 +174,7 @@ function factory(dependencies) { */ _computeRecipients() { const recipients = [...this.mentionedPartners]; - if (this.thread) { + if (this.thread && !this.isLog) { for (const recipient of this.thread.suggestedRecipientInfoList) { if (recipient.partner && recipient.isSelected) { recipients.push(recipient.partner); @@ -939,6 +939,7 @@ function factory(dependencies) { recipients: many2many('mail.partner', { compute: '_computeRecipients', dependencies: [ + 'isLog', 'mentionedPartners', 'threadSuggestedRecipientInfoListIsSelected', // FIXME thread.suggestedRecipientInfoList.partner should be a