[REV] Reverted use of quote_context in mail formation. Methods are still there, but will be improved in a future branch.

bzr revid: tde@openerp.com-20121026114114-4uar0usx7jzhl6rv
This commit is contained in:
Thibault Delavallée
2012-10-26 13:41:14 +02:00
parent daeccb5ab2
commit dd5961816c
2 changed files with 6 additions and 6 deletions
+4 -3
View File
@@ -143,13 +143,14 @@ class mail_notification(osv.Model):
return True
# add the context in the email
quote_context = self.pool.get('mail.message').message_quote_context(cr, uid, msg_id, context=context)
# TDE FIXME: comment, to be improved in a future branch
# quote_context = self.pool.get('mail.message').message_quote_context(cr, uid, msg_id, context=context)
# add signature
mail_mail = self.pool.get('mail.mail')
body_html = msg.body
if quote_context:
body_html = tools.append_content_to_html(body_html, quote_context, plaintext=False)
# if quote_context:
# body_html = tools.append_content_to_html(body_html, quote_context, plaintext=False)
signature = msg.author_id and msg.author_id.user_ids[0].signature or ''
if signature:
body_html = tools.append_content_to_html(body_html, signature)
+2 -3
View File
@@ -434,9 +434,8 @@ class test_mail(TestMailMockups):
self.assertEqual(len(sent_emails), 2, 'sent_email number of sent emails incorrect')
for sent_email in sent_emails:
self.assertEqual(sent_email['subject'], _mail_subject, 'sent_email subject incorrect')
# TDE FIXME: fix those tests, difficult to handle with fixed strings
# self.assertIn(_mail_body2, sent_email['body'], 'sent_email body incorrect')
# self.assertIn(_mail_bodyalt2, sent_email['body_alternative'], 'sent_email body_alternative incorrect')
self.assertIn(_mail_body2, sent_email['body'], 'sent_email body incorrect')
self.assertIn(_mail_bodyalt2, sent_email['body_alternative'], 'sent_email body_alternative incorrect')
# Test: mail_message: notified_partner_ids = group followers
message_pids = set([partner.id for partner in message.notified_partner_ids])
test_pids = set([p_b_id, p_c_id, p_d_id])