From a71b01ab24cf173dc52861ca067128258bdeb5f8 Mon Sep 17 00:00:00 2001 From: Fabien Pinckaers Date: Fri, 17 Aug 2012 13:55:13 +0200 Subject: [PATCH] [IMP] mail cleaning bzr revid: fp@tinyerp.com-20120817115513-3b3faqcl78blyrfo --- addons/email_template/email_template.py | 6 ++---- addons/email_template/email_template_view.xml | 1 - addons/email_template/wizard/email_template_preview.py | 1 - .../email_template/wizard/email_template_preview_view.xml | 1 - addons/email_template/wizard/mail_compose_message.py | 1 - 5 files changed, 2 insertions(+), 8 deletions(-) diff --git a/addons/email_template/email_template.py b/addons/email_template/email_template.py index b43b7d19b85..8cad887e0cb 100644 --- a/addons/email_template/email_template.py +++ b/addons/email_template/email_template.py @@ -38,7 +38,7 @@ except ImportError: class email_template(osv.osv): "Templates for sending email" - _inherit = 'mail.message' + _inherit = 'mail.mail' _name = "email.template" _description = 'Email Templates' _rec_name = 'name' # override mail.message's behavior @@ -147,7 +147,6 @@ class email_template(osv.osv): 'email_from': fields.char('From', size=128, help="Sender address (placeholders may be used here)"), 'email_to': fields.char('To', size=256, help="Comma-separated recipient addresses (placeholders may be used here)"), 'email_cc': fields.char('Cc', size=256, help="Carbon copy recipients (placeholders may be used here)"), - 'email_bcc': fields.char('Bcc', size=256, help="Blind carbon copy recipients (placeholders may be used here)"), 'reply_to': fields.char('Reply-To', size=250, help="Preferred response address (placeholders may be used here)"), 'mail_server_id': fields.many2one('ir.mail_server', 'Outgoing Mail Server', readonly=False, help="Optional preferred server for outgoing mails. If not set, the highest " @@ -306,7 +305,6 @@ class email_template(osv.osv): 'email_from': False, 'email_to': False, 'email_cc': False, - 'email_bcc': False, 'reply_to': False, 'auto_delete': False, 'model': False, @@ -326,7 +324,7 @@ class email_template(osv.osv): template = self.get_email_template(cr, uid, template_id, res_id, context) for field in ['subject', 'body_text', 'body_html', 'email_from', - 'email_to', 'email_cc', 'email_bcc', 'reply_to', + 'email_to', 'email_cc', 'reply_to', 'message_id']: values[field] = self.render_template(cr, uid, getattr(template, field), template.model, res_id, context=context) \ diff --git a/addons/email_template/email_template_view.xml b/addons/email_template/email_template_view.xml index a04790d1c1c..09691aec943 100644 --- a/addons/email_template/email_template_view.xml +++ b/addons/email_template/email_template_view.xml @@ -19,7 +19,6 @@ - diff --git a/addons/email_template/wizard/email_template_preview.py b/addons/email_template/wizard/email_template_preview.py index 4ef0e9fa156..edf0a7f3405 100644 --- a/addons/email_template/wizard/email_template_preview.py +++ b/addons/email_template/wizard/email_template_preview.py @@ -79,7 +79,6 @@ class email_template_preview(osv.osv_memory): model = template.model vals['email_to'] = self.render_template(cr, uid, template.email_to, model, res_id, context) vals['email_cc'] = self.render_template(cr, uid, template.email_cc, model, res_id, context) - vals['email_bcc'] = self.render_template(cr, uid, template.email_bcc, model, res_id, context) vals['reply_to'] = self.render_template(cr, uid, template.reply_to, model, res_id, context) vals['subject'] = self.render_template(cr, uid, template.subject, model, res_id, context) description = self.render_template(cr, uid, template.body_text, model, res_id, context) or '' diff --git a/addons/email_template/wizard/email_template_preview_view.xml b/addons/email_template/wizard/email_template_preview_view.xml index 39fb413fcde..84ffa9140a6 100644 --- a/addons/email_template/wizard/email_template_preview_view.xml +++ b/addons/email_template/wizard/email_template_preview_view.xml @@ -12,7 +12,6 @@ - diff --git a/addons/email_template/wizard/mail_compose_message.py b/addons/email_template/wizard/mail_compose_message.py index 1b007a990c0..078d495ea90 100644 --- a/addons/email_template/wizard/mail_compose_message.py +++ b/addons/email_template/wizard/mail_compose_message.py @@ -138,7 +138,6 @@ class mail_compose_message(osv.osv_memory): 'body_text': record.body_text or False, 'email_to': record.email_to or False, 'email_cc': record.email_cc or False, - 'email_bcc': record.email_bcc or False, 'reply_to': record.reply_to or False, 'model_id': model_id or False, 'attachment_ids': [(6, 0, [att.id for att in record.attachment_ids])]