[IMP] mail cleaning
bzr revid: fp@tinyerp.com-20120817115513-3b3faqcl78blyrfo
This commit is contained in:
parent
63c0cbfc17
commit
a71b01ab24
|
@ -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) \
|
||||
|
|
|
@ -19,7 +19,6 @@
|
|||
<field name="email_from" required="1"/>
|
||||
<field name="email_to" required="1"/>
|
||||
<field name="email_cc"/>
|
||||
<field name="email_bcc"/>
|
||||
<field name="reply_to"/>
|
||||
<field name="subject" required="1"/>
|
||||
<notebook colspan="4">
|
||||
|
|
|
@ -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 ''
|
||||
|
|
|
@ -12,7 +12,6 @@
|
|||
<group col="2" colspan="4">
|
||||
<field name="email_to" readonly="1"/>
|
||||
<field name="email_cc" readonly="1" attrs="{'invisible': [('email_cc','=',False)]}"/>
|
||||
<field name="email_bcc" readonly="1" attrs="{'invisible': [('email_bcc','=',False)]}"/>
|
||||
<field name="reply_to" readonly="1" attrs="{'invisible': [('reply_to','=',False)]}"/>
|
||||
<field name="subject" readonly="1"/>
|
||||
</group>
|
||||
|
|
|
@ -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])]
|
||||
|
|
Loading…
Reference in New Issue