diff --git a/addons/mail/static/src/components/composer_suggested_recipient/composer_suggested_recipient.js b/addons/mail/static/src/components/composer_suggested_recipient/composer_suggested_recipient.js index f981af8ea64..120b55aed57 100644 --- a/addons/mail/static/src/components/composer_suggested_recipient/composer_suggested_recipient.js +++ b/addons/mail/static/src/components/composer_suggested_recipient/composer_suggested_recipient.js @@ -62,7 +62,7 @@ export class ComposerSuggestedRecipient extends Component { return; } const isChecked = this._checkboxRef.el.checked; - this.composerSuggestedRecipientView.suggestedRecipientInfo.update({ isSelected: isChecked }); + this.composerSuggestedRecipientView.suggestedRecipientInfo.update({ isChecked }); if (!this.composerSuggestedRecipientView.suggestedRecipientInfo.partner) { // Recipients must always be partners. On selecting a suggested // recipient that does not have a partner, the partner creation form diff --git a/addons/mail/static/src/models/suggested_recipient_info.js b/addons/mail/static/src/models/suggested_recipient_info.js index 0c302897915..8c8ae962eb6 100644 --- a/addons/mail/static/src/models/suggested_recipient_info.js +++ b/addons/mail/static/src/models/suggested_recipient_info.js @@ -32,6 +32,12 @@ registerModel({ id: attr({ identifying: true, }), + /** + * Determines whether this suggested recipient has been checked on UI. + * A suggested recipient info is checked when current user manually set + * checkbox to "checked" value. + */ + isChecked: attr(), /** * Determines whether `this` will be added to recipients when posting a * new message on `this.thread`. @@ -41,7 +47,7 @@ registerModel({ * Prevents selecting a recipient that does not have a partner. */ compute() { - return this.partner ? this.isSelected : false; + return this.partner ? this.isChecked : false; }, default: true, }),