Commit Graph

29 Commits

Author SHA1 Message Date
Denis Ledoux 245bb4ebdf [FIX] mail: to/from/reply-to addresses formated according to RFC2822
Use formataddr method from email.utils lib, which do the job correctly
2014-08-12 13:40:45 +02:00
Olivier Dony a7cb9b762d [FIX] email_template: fix invalid uses of tools.email_split
This is necessary to have the tests pass after
the corresponding server patch in server 7.0
at revision 5198 revision-id: odo@openerp.com-20140114120344-r58wndgybqusnnq7

lp bug: https://launchpad.net/bugs/1199386 fixed
lp bug: https://launchpad.net/bugs/1165531 fixed

bzr revid: odo@openerp.com-20140114134627-6j83f4s6pvnj4uma
2014-01-14 14:46:27 +01:00
Thibault Delavallée b92ad39005 [FIX] email_template: support of email_recipients in send_mail.
email_recipients is a char fields holding a comma separated list of partner_ids
that are the email recipients. This field is correctly handled in the composer
but was not taken into account in the send_mail method email_template.
However due to model limitations, this field can only be taken into account
when sending the email directly using force_send. When the email is
queued, no field is available to hold the value of email_recipients.
This is already fixed in trunk/v8 as a field has been added to handle
this value.

[FIX] mail: when sending email to some recipients_ids, filter to have only
the existing partner_ids. Trusting email template to generate valid
partner_ids is a bit risky.

[TESTS] email_template: added tests for send_mail

bzr revid: tde@openerp.com-20131220144652-h18yam60vpedbh7x
2013-12-20 15:46:52 +01:00
Olivier Dony 96dd64e31f [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
2013-04-17 10:14:10 +02:00
Christophe Simonis 8a7fad6b22 [FIX] email_template/tests/test_mail.py: compose.body is not htmlized anymore
bzr revid: chs@openerp.com-20130411190401-0ajvlapuyxop0zhn
2013-04-11 21:04:01 +02:00
Thibault Delavallée 1aac220ee2 [IMP] mail: tests: updated tests for attachments
bzr revid: tde@openerp.com-20130307110657-1cdelhyd1girmp28
2013-03-07 12:06:57 +01:00
Thibault Delavallée 46a5b63cad [IMP] email_template: better management of attachments. In mass mail, we want attachments to be duplicated due to the ownership concept of attachments in OpenERP.
bzr revid: tde@openerp.com-20130301144827-762362bgng5m4nye
2013-03-01 15:48:27 +01:00
Thibault Delavallée aa865c8b61 [FIX] Still fixing attachments through templates.
bzr revid: tde@openerp.com-20130228145513-6g30ujr3cm0j8b3u
2013-02-28 15:55:13 +01:00
Thibault Delavallée d6fcee5a4f [FIX] email-template: attachments should have correct model and res_id from template.
bzr revid: tde@openerp.com-20130228144630-7x6kh5jcn4w557do
2013-02-28 15:46:30 +01:00
Thibault Delavallée f392f09d49 [FIX] mail: fixed tests.
bzr revid: tde@openerp.com-20130214111230-evgwyw9xofiq8mgn
2013-02-14 12:12:30 +01:00
Thibault Delavallée 9173e032ec [IMP] email_template: updated mail-related tests.
bzr revid: tde@openerp.com-20130214083516-olpnt3ol7ry5vwkj
2013-02-14 09:35:16 +01:00
Thibault Delavallée efedfde1bd [FIX] email_template: template does not erase the wizard content anymore.
bzr revid: tde@openerp.com-20130213173940-ut3ff921aocgw2rf
2013-02-13 18:39:40 +01:00
Thibault Delavallée 9b2406948e [IMP] mail, email_template: updated tests to match the new html sanitizer, that produces slighty different results (encoded symbols, encapsulated html).
bzr revid: tde@openerp.com-20121226162610-y2y5bmy8bux8smkp
2012-12-26 17:26:10 +01:00
Olivier Dony d0934da481 [FIX] mail.message: all recipients explicitly mentioned should receive a notification, including the author
The above revision(s) will be removed.

bzr revid: odo@openerp.com-20121220182004-460168pd9rofbpgw
2012-12-20 19:20:04 +01:00
Thibault Delavallée 6f1f3b325d [FIX] email_template: fixed tests.
bzr revid: tde@openerp.com-20121212114919-aj1rq1ei1b0gkm48
2012-12-12 12:49:19 +01:00
Olivier Dony e5374b93b4 [REF] email_template: cleanup/remove obsolete fields on mail composition wizard: use_template is the default
bzr revid: odo@openerp.com-20121116170259-08eot6wy40yehkh4
2012-11-16 18:02:59 +01:00
Olivier Dony e5921325bd [REM] mail.compose.wizard: remove unused body_text and content_subtype fields
These fields were used in pre-7.0 to manage the plaintext variant of the 
mail being composed, but as of 7.0 the composition wizard will always
use the HTML/Rich text mode, so they can be dropped.

bzr revid: odo@openerp.com-20121115135634-fcy6mexnctwg0nxb
2012-11-15 14:56:34 +01:00
Thibault Delavallée 45eadceea6 [FIX] email_template: udpated test according to new specs of append_content_to_html.
bzr revid: tde@openerp.com-20121114133438-8m1q0r02i4xory0e
2012-11-14 14:34:38 +01:00
Thibault Delavallée 64277d04c3 [IMP] Addons: messages when installing key apps is not of comment subtype, meaning they are effectively pushed.
bzr revid: tde@openerp.com-20121114115504-tvh0j9ks0jde12ed
2012-11-14 12:55:04 +01:00
Thibault Delavallée 5baafe992b [REV] [IMP] email_template tests: reverted CHM changes about adding self everywhere; cleaned the new test.
bzr revid: tde@openerp.com-20121113131044-0z0286izrw35w6f1
2012-11-13 14:10:44 +01:00
Christophe Matthieu 42dd7711b5 [FIX] email_template: change name value and concat test
bzr revid: chm@openerp.com-20121107113925-1nmjicj444nez25c
2012-11-07 12:39:25 +01:00
Christophe Matthieu 621c8b4bb7 [IMP] email_template: add test: The fields email_to, email_to_partner and email_cc return the good list of partner_id
bzr revid: chm@openerp.com-20121107102745-9d0dt1fkzauvfyjs
2012-11-07 11:27:45 +01:00
Thibault Delavallée 6966509c6e [IMP] mail_message: partner_ids now holds only specific destination partners. Partners + followers is now stored into notified_partner_ids. Added a from field on mail_message, holding the email address of the sender, in case of an incoming email message that cannot be linked to a partner.
bzr revid: tde@openerp.com-20121025113048-5f1ob8ligqzb52gu
2012-10-25 13:30:48 +02:00
Fabien Pinckaers eeeabc4b57 [FIX] automated tests
bzr revid: fp@openerp.com-20121001211605-u74rjn9doh65vu94
2012-10-01 23:16:05 +02:00
Thibault Delavallée 0e4422809b [IMP] email_template: now inherit from TestMailMockups test class.
bzr revid: tde@openerp.com-20120913114917-na341w0ja7n0ditu
2012-09-13 13:49:17 +02:00
Thibault Delavallée 089b64214d [FIX] email_template: various improvements and fixes.
email_template.py: fixed attachments
mail.compose.message: fixed various bugs of onchanges and the use of templates
with the composer. Cleaned and added tests related to the composer using
email_template.
mail.compose.message form view: the use of templates is now for
advanced formatting only.

bzr revid: tde@openerp.com-20120905155626-h6laee191ttnglkh
2012-09-05 17:56:26 +02:00
Thibault Delavallée a3db9b35bd [WIP] email_template: WIP about debugging the use of email_templates. A method to get and handle values coming from generate_emial has been added. TODO: use it where necessary, clean the remaining of the code, add some tests. Added some new tests.
bzr revid: tde@openerp.com-20120903181111-yy9y6omu4vyhdc11
2012-09-03 20:11:11 +02:00
Thibault Delavallée 761864c11c [FIX] [WIP] email_template: composition wizard: added render_message that get back the values generated by the template in mass_mail mode; email_template overrides the basic behavior of mail, to use the templating power (niak). Various fixes in the wizard, mostly in onchange_template_id. Some code cleaning. Updated the view, because onchange_template_id now take an extr argument (model). Added some tests used during this WIP. Will be updated next week.
bzr revid: tde@openerp.com-20120831171900-ii0ucshjnf8vjc3z
2012-08-31 19:19:00 +02:00
Thibault Delavallée 088dc6a3d3 [WIP] email_template: WIP on mail.compose.message in email_template. Cleaned a bit the code, the view. Added base for testing mail composer in tests. TODO: handle partners, email_cc, email_to, attachments, ... almost everything.
bzr revid: tde@openerp.com-20120830155154-419yn1aj0u6vq8yb
2012-08-30 17:51:54 +02:00