diff options
| author | Thibault Delavallée <tde@odoo.com> | 2016-09-13 14:52:51 +0200 |
|---|---|---|
| committer | Thibault Delavallée <tde@odoo.com> | 2016-09-13 18:02:44 +0200 |
| commit | 7f8fb0dbfb997a9cfb9a8fc21127f34a093401a2 (patch) | |
| tree | f4993c3c83cfff03bbce738f166ab431dbf5ab21 /addons/mail/wizard/mail_compose_message.py | |
| parent | 85741a0687fa56ff1b88a08855cab373371c80bc (diff) | |
[FIX] mail: add default recipients only when not having one specified
Diffstat (limited to 'addons/mail/wizard/mail_compose_message.py')
| -rw-r--r-- | addons/mail/wizard/mail_compose_message.py | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index 373dcf7d135..acaf1825348 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -466,8 +466,9 @@ class MailComposer(models.TransientModel): bodies = self.render_template(self.body, self.model, res_ids, post_process=True) emails_from = self.render_template(self.email_from, self.model, res_ids) replies_to = self.render_template(self.reply_to, self.model, res_ids) - - default_recipients = self.env['mail.thread'].message_get_default_recipients(res_model=self.model, res_ids=res_ids) + default_recipients = {} + if not self.partner_ids: + default_recipients = self.env['mail.thread'].message_get_default_recipients(res_model=self.model, res_ids=res_ids) results = dict.fromkeys(res_ids, False) for res_id in res_ids: |
