[FIX] website_slides: correct auto_delete on mail
Steps to reproduce ================== 1. Open course with enroll policy onInvitation or Click on three dot of any course in kanban view 2. Click on Invite > add a recipient 3. Go to mail template internal link 4. Go to setting tab 5. Disable the 'Auto delete' > save & close it 6. Click on Send 7. Go the Technical/Emails (in debug mode) 8. Send the mail by clicking 'Send now' Issue - Even if we unchecked auto delete still the mail is deleted automatically Technical ========= In the '_prepare_mail_values' method of the 'slide.channel.invite' model, the mail values for 'mail.mail' are prepared and the auto delete is set to True. After this commit ================= You can view the sent mails since the auto_delete is configured based on the template value for invitation. Task-3546212 closes odoo/odoo#141141 X-original-commit: 3d9640d5c24f345d67e4e74e62584e60cc27815b Signed-off-by: Warnon Aurélien (awa) <awa@odoo.com>
This commit is contained in:
@@ -92,7 +92,7 @@ class SlideChannelInvite(models.TransientModel):
|
||||
mail_values = {
|
||||
'attachment_ids': [(4, att.id) for att in self.attachment_ids],
|
||||
'author_id': self.env.user.partner_id.id,
|
||||
'auto_delete': True,
|
||||
'auto_delete': self.template_id.auto_delete if self.template_id else True,
|
||||
'body_html': body,
|
||||
'email_from': self.env.user.email_formatted,
|
||||
'model': None,
|
||||
|
||||
Reference in New Issue
Block a user