Merge lp:~openerp-dev/openobject-addons/trunk-user-signature-ima into lp:openobject-addons

Proposed by Vidhin Mehta (OpenERP)
Status: Work in progress
Proposed branch: lp:~openerp-dev/openobject-addons/trunk-user-signature-ima
Merge into: lp:openobject-addons
Diff against target: 56 lines (+5/-5)
3 files modified
mail/mail_followers.py (+1/-1)
mail/mail_mail.py (+1/-1)
mail/tests/test_mail_features.py (+3/-3)
To merge this branch: bzr merge lp:~openerp-dev/openobject-addons/trunk-user-signature-ima
Reviewer Review Type Date Requested Status
OpenERP Core Team Pending
Review via email: mp+201904@code.launchpad.net
To post a comment you must log in.
9006. By Mahendra Barad(OpenERP)

[IMP]pass signature as html instead of content

9007. By Kunal Chavda

[MERGE]with latest.

9008. By Jaysinh Shukla(OpenERP)

[MERGE]: Merged with addons

Unmerged revisions

9008. By Jaysinh Shukla(OpenERP)

[MERGE]: Merged with addons

9007. By Kunal Chavda

[MERGE]with latest.

9006. By Mahendra Barad(OpenERP)

[IMP]pass signature as html instead of content

9005. By Vidhin Mehta (OpenERP)

[MERGE]Trunk.

9004. By Ishwar Malvi(OpenERP)

[MERGE]with trunk.

9003. By Ishwar Malvi(OpenERP)

[MERGE]with trunk.

9002. By Ishwar Malvi(OpenERP)

[MERGE]with trunk.

9001. By Ishwar Malvi(OpenERP)

[MERGE]with trunk.

9000. By Ishwar Malvi(OpenERP)

[MERGE]with latest.

8999. By Ishwar Malvi(OpenERP)

[IMP]revert back to previous code and improved code in testcase for signature.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'mail/mail_followers.py'
2--- mail/mail_followers.py 2013-10-27 12:31:04 +0000
3+++ mail/mail_followers.py 2014-04-08 13:16:34 +0000
4@@ -126,7 +126,7 @@
5 # add user signature
6 user = self.pool.get("res.users").browse(cr, SUPERUSER_ID, [user_id], context=context)[0]
7 if user.signature:
8- signature = plaintext2html(user.signature)
9+ signature = user.signature
10 else:
11 signature = "--<br />%s" % user.name
12 footer = tools.append_content_to_html(footer, signature, plaintext=False, container_tag='p')
13
14=== modified file 'mail/mail_mail.py'
15--- mail/mail_mail.py 2014-02-26 17:00:02 +0000
16+++ mail/mail_mail.py 2014-04-08 13:16:34 +0000
17@@ -203,7 +203,7 @@
18 """
19 body = self.send_get_mail_body(cr, uid, mail, partner=partner, context=context)
20 subject = self.send_get_mail_subject(cr, uid, mail, partner=partner, context=context)
21- body_alternative = tools.html2plaintext(body)
22+ body_alternative = tools.html2plaintext(body)
23
24 # generate email_to, heuristic:
25 # 1. if 'partner' is specified and there is a related document: Followers of 'Doc' <email>
26
27=== modified file 'mail/tests/test_mail_features.py'
28--- mail/tests/test_mail_features.py 2013-11-27 15:32:57 +0000
29+++ mail/tests/test_mail_features.py 2014-04-08 13:16:34 +0000
30@@ -22,7 +22,7 @@
31 from openerp.addons.mail.mail_mail import mail_mail
32 from openerp.addons.mail.mail_thread import mail_thread
33 from openerp.addons.mail.tests.common import TestMail
34-from openerp.tools import mute_logger, email_split
35+from openerp.tools import mute_logger, email_split, html2plaintext
36 from openerp.tools.mail import html_sanitize
37
38
39@@ -492,7 +492,7 @@
40 'message_post: notification email body alternative should contain the body')
41 self.assertNotIn('<p>', sent_email['body_alternative'],
42 'message_post: notification email body alternative still contains html')
43- self.assertIn(user_raoul.signature, sent_email['body_alternative'],
44+ self.assertIn(html2plaintext(user_raoul.signature), sent_email['body_alternative'],
45 'message_post: notification email body alternative should contain the sender signature')
46 self.assertFalse(sent_email['references'],
47 'message_post: references should be False when sending a message that is not a reply')
48@@ -563,7 +563,7 @@
49 'message_post: notification email body alternative should contain the body')
50 self.assertNotIn('<p>', sent_email['body_alternative'],
51 'message_post: notification email body alternative still contains html')
52- self.assertIn(user_raoul.signature, sent_email['body_alternative'],
53+ self.assertIn(html2plaintext(user_raoul.signature), sent_email['body_alternative'],
54 'message_post: notification email body alternative should contain the sender signature')
55 self.assertIn(msg_message_id, sent_email['references'],
56 'message_post: notification email references lacks parent message message_id')

Subscribers

People subscribed via source and target branches

to all changes: