From de95dee0621c9dd634bcb424cb1662f5b8bfdb4d Mon Sep 17 00:00:00 2001 From: "Merlin (megu)" Date: Thu, 5 May 2022 09:41:03 +0000 Subject: [PATCH] [FIX] mail: send email from CRM using a template When sending emails from CRM, you can save the mail as a new template. Despite having selected the desired recipients, the mails sent will not have any recipients. Steps to reproduce: 1. Install CRM and open the app 2. Trigger the list view of the pipeline 3. Select any opportunities, go to Action and click on 'Send email' 4. Give a subject to the email and click on 'SAVE AS NEW TEMPLATE' 5. Send the email 6. Go to emails, there are no recipients for the emails generated Solution: Set the `use_default_to` to true by default when using the 'SAVE AS NEW TEMPLATE' button opw-2827177 X-original-commit: 1180b8cd9f0ed5bebdef97d702f29a5652fa6ac8 Part-of: odoo/odoo#93025 --- addons/mail/wizard/mail_compose_message.py | 1 + 1 file changed, 1 insertion(+) diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index c15ad3eb36b..6bbad560f2b 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -335,6 +335,7 @@ class MailComposer(models.TransientModel): 'subject': record.subject or False, 'body_html': record.body or False, 'model_id': model.id or False, + 'use_default_to': True, } template = self.env['mail.template'].create(values)