diff options
| author | Achraf (abz) <abz@odoo.com> | 2020-10-27 14:09:10 +0000 |
|---|---|---|
| committer | Achraf (abz) <abz@odoo.com> | 2020-10-27 14:47:30 +0000 |
| commit | 4e660dfdf40a36eed7123bcea2452874238fddd8 (patch) | |
| tree | bcdd579422148d5bcbc3f151ec9b5e78bd9107f6 | |
| parent | f29a625857128617c2d4d795e648d5ad1f7ab8a4 (diff) | |
[FIX] mail: Do not send log notes to customers
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#60836
Signed-off-by: Sébastien Theys (seb) <seb@odoo.com>
| -rw-r--r-- | addons/mail/static/src/models/composer/composer.js | 3 |
1 files changed, 2 insertions, 1 deletions
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 |
