[REVERT] mail: undo model-level change that can cause issue for stable deployments

Failing to force a manual update of the mail module would cause
all composer wizards to display html contents without the WYSIWYG
editor, making it mostly unusable for regular users. Users are
not expected to always force an update of all modules after
updating to the latest source code.

bzr revid: odo@openerp.com-20130417081410-dwc33ymizlihvbng
This commit is contained in:
Olivier Dony 2013-04-17 10:14:10 +02:00
parent f6152a63e1
commit 96dd64e31f
3 changed files with 2 additions and 9 deletions

View File

@ -155,7 +155,7 @@ class test_message_compose(TestMailBase):
message_pids = [partner.id for partner in compose.partner_ids]
partner_ids = [p_a_id]
self.assertEqual(compose.subject, '${object.name}', 'mail.compose.message subject incorrect')
self.assertEqual(compose.body, '${object.description}', 'mail.compose.message body incorrect')
self.assertEqual(compose.body, '<p>${object.description}</p>', 'mail.compose.message body incorrect')
self.assertEqual(set(message_pids), set(partner_ids), 'mail.compose.message partner_ids incorrect')
# 2. Post the comment, get created message

View File

@ -116,13 +116,6 @@ class mail_compose_message(osv.TransientModel):
'mail_compose_message_ir_attachments_rel',
'wizard_id', 'attachment_id', 'Attachments'),
'filter_id': fields.many2one('ir.filters', 'Filters'),
# Replace `body` with a text field because html fields are sanitized
# just before saving data into the database. This cause the
# sanitization of the templated messages (for mass mailing messages)
# before the rendering, forbidding the use of templated html links.
# The html of the message will be sanitized by message_post()
'body': fields.text('Contents'),
}
_defaults = {

View File

@ -30,7 +30,7 @@
</div>
<field name="subject" placeholder="Subject..."/>
</group>
<field name="body" widget='html'/>
<field name="body"/>
<field name="attachment_ids" widget="many2many_binary"/>
<footer>
<button string="Send" name="send_mail" type="object" class="oe_highlight"/>