From cbf55bc07d979dac915a3d7314ee0979ec4d17ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thibault=20Delavall=C3=A9e?= Date: Mon, 29 Oct 2012 11:09:10 +0100 Subject: [PATCH] [IMP] [FIX] mail: replying with the wizard does not quote the original message anymore. Updated tests. bzr revid: tde@openerp.com-20121029100910-c0y6tl1zg2qsqfv5 --- addons/mail/tests/test_mail.py | 2 +- addons/mail/wizard/mail_compose_message.py | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/addons/mail/tests/test_mail.py b/addons/mail/tests/test_mail.py index ea0db38fd26..85cfdca578c 100644 --- a/addons/mail/tests/test_mail.py +++ b/addons/mail/tests/test_mail.py @@ -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:
Pigs rules
', compose.body, 'mail.message body is incorrect') + # self.assertIn('Administrator wrote:
Pigs rules
', 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: diff --git a/addons/mail/wizard/mail_compose_message.py b/addons/mail/wizard/mail_compose_message.py index b93f6eea7a9..1bcbb0c2efc 100644 --- a/addons/mail/wizard/mail_compose_message.py +++ b/addons/mail/wizard/mail_compose_message.py @@ -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',