diff options
| author | Victor Feyens <vfe@odoo.com> | 2019-10-09 14:41:25 +0000 |
|---|---|---|
| committer | fw-bot <otis@odoo.com> | 2019-10-10 16:39:09 +0000 |
| commit | 75f2d8444e8f4b31fec96f2ddea7fc91220d3cc9 (patch) | |
| tree | b474a34775cc8a855dbb231348e09d59ff49e6b5 /addons | |
| parent | 04ada1ddae350db369d77ddf51194eca2078a3f1 (diff) | |
[FIX] mail: fix mailing wizard when partners and template specified
if partner_ids and template_id are set, a traceback happens.
Indeed, some mail fields are not taken from the res_ids when partner_ids
is set.
When trying to update the values with the one from the template, the
existing values are popped, which raised an error as those keys weren't
set.
closes odoo/odoo#38434
X-original-commit: c8ad614718674b55e9af5edd062ded958136e7ac
Signed-off-by: Victor Feyens (vfe) <vfe@odoo.com>
Diffstat (limited to 'addons')
| -rw-r--r-- | addons/mail/wizard/mail_compose_message.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index b8b516f878c..c1d7a1edcc7 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -508,9 +508,9 @@ class MailComposer(models.TransientModel): for res_id in res_ids: if template_values.get(res_id): # recipients are managed by the template - results[res_id].pop('partner_ids') - results[res_id].pop('email_to') - results[res_id].pop('email_cc') + results[res_id].pop('partner_ids', None) + results[res_id].pop('email_to', None) + results[res_id].pop('email_cc', None) # remove attachments from template values as they should not be rendered template_values[res_id].pop('attachment_ids', None) else: |
