[IMP] remove the fucking auto_delete!!!

This commit is contained in:
Sébastien BEAU
2019-01-08 23:25:42 +01:00
committed by Alexis de Lattre
parent 0f35f8e92b
commit aec5bb9c91
3 changed files with 20 additions and 0 deletions

View File

@@ -1,3 +1,4 @@
# -*- coding: utf-8 -*-
from . import mail
from . import mail_template

View File

@@ -43,6 +43,13 @@ class ResPartner(models.Model):
send_after_commit=send_after_commit,
user_signature=user_signature)
def _notify_prepare_email_values(self, message):
res = super(ResPartner, self)._notify_prepare_email_values(message)
# Never auto delete notification email
# fucking to hard to debug when message have been delete
res['auto_delete'] = False
return res
class TemplatePreview(models.TransientModel):
_inherit = "email_template.preview"

View File

@@ -0,0 +1,12 @@
# -*- coding: utf-8 -*-
# Copyright 2018 Akretion (http://www.akretion.com).
# @author Sébastien BEAU <sebastien.beau@akretion.com>
# License AGPL-3.0 or later (http://www.gnu.org/licenses/agpl).
from openerp import fields, models
class MailTemplate(models.Model):
_inherit = 'mail.template'
auto_delete = fields.Boolean(default=False)