[IMP] [FIX] mail: replying with the wizard does not quote the original message anymore. Updated tests.
bzr revid: tde@openerp.com-20121029100910-c0y6tl1zg2qsqfv5
This commit is contained in:
parent
4c969ed551
commit
cbf55bc07d
|
@ -533,7 +533,7 @@ class test_mail(TestMailMockups):
|
|||
self.assertEqual(compose.content_subtype, 'html', 'mail.compose.message incorrect content_subtype')
|
||||
# Test: mail.message: subject as Re:.., body in html, parent_id
|
||||
self.assertEqual(compose.subject, _msg_reply, 'mail.message incorrect subject')
|
||||
self.assertIn('Administrator wrote:<blockquote><pre>Pigs rules</pre></blockquote>', compose.body, 'mail.message body is incorrect')
|
||||
# self.assertIn('Administrator wrote:<blockquote><pre>Pigs rules</pre></blockquote>', compose.body, 'mail.message body is incorrect')
|
||||
self.assertEqual(compose.parent_id and compose.parent_id.id, message.id, 'mail.message parent_id incorrect')
|
||||
# Test: mail.message: attachments
|
||||
for attach in compose.attachment_ids:
|
||||
|
|
|
@ -156,8 +156,6 @@ class mail_compose_message(osv.TransientModel):
|
|||
reply_subject = tools.ustr(message_data.subject or '')
|
||||
if not (reply_subject.startswith('Re:') or reply_subject.startswith(re_prefix)) and message_data.subject:
|
||||
reply_subject = "%s %s" % (re_prefix, reply_subject)
|
||||
# create the reply in the body
|
||||
reply_body = (context and context.get('default_body') or '')
|
||||
# get partner_ids from original message
|
||||
partner_ids = [partner.id for partner in message_data.partner_ids] if message_data.partner_ids else []
|
||||
|
||||
|
@ -166,7 +164,6 @@ class mail_compose_message(osv.TransientModel):
|
|||
'model': message_data.model,
|
||||
'res_id': message_data.res_id,
|
||||
'parent_id': message_data.id,
|
||||
'body': reply_body,
|
||||
'subject': reply_subject,
|
||||
'partner_ids': partner_ids,
|
||||
'content_subtype': 'html',
|
||||
|
|
Loading…
Reference in New Issue