Commit Graph

297 Commits

Author SHA1 Message Date
Thibault Delavallée 25734f2cfd [IMP] mail, portal: improved tests. A new TestMailMockup class has been defined, holding the various mockups for the mail gateway, to avoid having duplicate code in tests using emails. Added tests in portal about the invite mechanism.
bzr revid: tde@openerp.com-20120913103529-410g9sk32sbbmkgn
2012-09-13 12:35:29 +02:00
Sanjay Gohel (Open ERP) 18ceddcf2e [IMP]minor changes
bzr revid: sgo@tinyerp.com-20120913091502-dvlpgoa3dr72km04
2012-09-13 14:45:02 +05:30
Thibault Delavallée 13583b36d3 [FIX] mail, portal: fixed tests to remove mockups at tearDown. Otherwise, when using tests, no email could be send because of the mockups installed during tests.
bzr revid: tde@openerp.com-20120913084119-6ligp3o864vtzlmz
2012-09-13 10:41:19 +02:00
Sanjay Gohel (Open ERP) b6e298534c [MERGE]merge with parent branch
bzr revid: sgo@tinyerp.com-20120913053647-12otf3bev3rap3l7
2012-09-13 11:06:47 +05:30
Thibault Delavallée a1dec2072a [FIX] Fixed test mocking wrong method.
bzr revid: tde@openerp.com-20120912161349-ya5jvplze9ke3rtr
2012-09-12 18:13:49 +02:00
Thibault Delavallée 2b7112d7ae [MERGE] Merged with addons/trunk.
bzr revid: tde@openerp.com-20120912142748-mnsaftqea2anwkrc
2012-09-12 16:27:48 +02:00
Thibault Delavallée a16bf464f5 [IMP] mail: added a new behavior when sending notifications. Each notification can now be customized (subject, body); each partner to notify will receive a different ir_email. It is still the same mail_mail as a basis, but specific content can be send to partners (for example, portal links). Updated the tests as well.L
bzr revid: tde@openerp.com-20120912133843-lltf7pzder386e2w
2012-09-12 15:38:43 +02:00
Sanjay Gohel (Open ERP) ce39ffe927 [IMP]changed as per new spec update and make it work for crm changes done in crm
bzr revid: sgo@tinyerp.com-20120912112245-3cp03024fiqb47qs
2012-09-12 16:52:45 +05:30
Thibault Delavallée afb49abd3c [FIX] mail.compose.message: fixed a crashing test; fixed parent_id of created mail.message not set, and added a test for that case.
bzr revid: tde@openerp.com-20120912102111-jg5thn4tia92hu4k
2012-09-12 12:21:11 +02:00
Thibault Delavallée 9c50df8f31 [CLEAN] small cleanup of test_mail.
bzr revid: tde@openerp.com-20120911132245-35ik5ny86b2122zl
2012-09-11 15:22:45 +02:00
Thibault Delavallée dfa14420d2 [WIP] mail_message: continued work on message_read and expandables.
bzr revid: tde@openerp.com-20120911120117-xeeercvglfwq3c9e
2012-09-11 14:01:17 +02:00
Thibault Delavallée 741bbaa9f4 [WIP] mail_message.message_read(): WIP about having correct expandables. Will be updated next week.
bzr revid: tde@openerp.com-20120907160920-4ijs93y9ogp39xma
2012-09-07 18:09:20 +02:00
Amit Patel (OpenERP) f36dd4c891 [IMP]:improved test case
bzr revid: apa@tinyerp.com-20120906105914-iwoi15ghgtibt2lr
2012-09-06 16:29:14 +05:30
Amit Patel (OpenERP) 1334eb7a0d [MERGE]:trunk-mail-cleaning-fp
bzr revid: apa@tinyerp.com-20120906061835-gb317yvqnd5vaiei
2012-09-06 11:48:35 +05:30
Olivier Dony 1eedac6928 [FIX] mail: fix tests now that html sanitization is enabled on fields.html
bzr revid: odo@openerp.com-20120905230743-3lnadi2jf2azx2rr
2012-09-06 01:07:43 +02:00
Olivier Dony 1275d524f2 [IMP] mail: fix and test parsing of plaintext messages
bzr revid: odo@openerp.com-20120905160145-2e11txqm5jffij6v
2012-09-05 18:01:45 +02:00
Thibault Delavallée 9fb978ea81 [IMP] mail: added and cleaned the tests. Fixed various small bugs in composer. Fixed mail_message.message_read() and flattening algorithm. Cleaned tests for message_read to have a more precise test.
bzr revid: tde@openerp.com-20120905155319-wd168m5snb25ari9
2012-09-05 17:53:19 +02:00
Olivier Dony 5f1dce419b [IMP] mail*: implement auto-deletion mechanism for mail.message, mail.mail and the attachment
This is based on the auto_delete flag on mail.mail
and the assumption that mail.mail records created
without a parent message will be deleted as a whole,
including the parent message and its attachments.
This is contrasted with mail.mail records created
for notifications regarding a mail.message, and therefore
created with an existing `mail_message_id` parent.
For this last case the parent must not be deleted
along with the child mail.mail, as it exists on its own.

bzr revid: odo@openerp.com-20120905151950-7jv6hi0x5fx5iytp
2012-09-05 17:19:50 +02:00
Sanjay Gohel (Open ERP) ef747c7143 [IMP]improve test case
bzr revid: sgo@tinyerp.com-20120905053031-dqtcfyr1na9j7zpk
2012-09-05 11:00:31 +05:30
Sanjay Gohel (Open ERP) 43c71f585e [MERGE]merge with mail-cleaning-fp
bzr revid: sgo@tinyerp.com-20120905050803-qwrknvluqtkpwx6g
2012-09-05 10:38:03 +05:30
Thibault Delavallée fd2a413969 [FIX] [CLEAN] mail_thread: misc cleanup (comments, vars, typo). Fixed subscriber API. It now handles a read_back key in context to return the new value of the field. The purpose is to use it in mail_followers widget, that behaves asynchronously compared to the form_view, and that need updated values after subscribing a user. Updated mail_followers widget, cleaned its code. Updated mail_group with wrappers on message_subscriber_users, because it was setting user_ids as context.
bzr revid: tde@openerp.com-20120904133648-plsziijac64lw4de
2012-09-04 15:36:48 +02:00
Amit Patel (OpenERP) 0a5ebb52e1 [MERGE]:trunk-mail-cleaning-fp
bzr revid: apa@tinyerp.com-20120904104409-w9zl98qjpem10pan
2012-09-04 16:14:09 +05:30
Sanjay Gohel (Open ERP) 92b707c116 [MERGE]merge with parent branch
bzr revid: sgo@tinyerp.com-20120904093250-fwawd23g26064wnl
2012-09-04 15:02:50 +05:30
Sanjay Gohel (Open ERP) 93f5c6b6a9 [IMP]add unit test for message subtype
bzr revid: sgo@tinyerp.com-20120904093111-hj291blbbkg39cey
2012-09-04 15:01:11 +05:30
Thibault Delavallée c52ab94960 [REVIEW] addons: small cleanups nex to a diff read. Some improvements will follow, this commit is about small cleanups.
bzr revid: tde@openerp.com-20120904092820-56zgwpkqfpd7as5k
2012-09-04 11:28:20 +02:00
Thibault Delavallée 0f3101cec5 [FIX] mail.compose.message: fixed send_mail about getting mass_mail values from template; fixed generated body that was adding a signature in reply mode; added the test that trigerred that bug.
bzr revid: tde@openerp.com-20120831171507-1prt4h46zsj77m23
2012-08-31 19:15:07 +02:00
Thibault Delavallée bdd972e3c9 [FIX] mail.message: message_read: fixed a call to a dict keyu not necessarily existing. Cleaned a bit the code, as well as the code of the related tests.
bzr revid: tde@openerp.com-20120831143707-ezcn17g5u39tcepq
2012-08-31 16:37:07 +02:00
Thibault Delavallée 0b67a85725 [FIX] mail.message, mail.compose.message: fixed attachments management, added tests.
bzr revid: tde@openerp.com-20120831125605-1oizomm2pv3b5rse
2012-08-31 14:56:05 +02:00
Thibault Delavallée 9e6cce28b8 [FIX] mail: tests: fixed followers test, because using set() allows to override a test that was precisely about not having a same value more than once in follower_ids.
bzr revid: tde@openerp.com-20120831112721-56qfnh9vk1xkbke0
2012-08-31 13:27:21 +02:00
Thibault Delavallée 00fc7d1e88 [IMP] mail.compose.message: added basic mass_mail support back. Moved generation into a dedicated method, to be inherited in email_template. Added somes tests in mail to test mass_mailing without email_template.
bzr revid: tde@openerp.com-20120830143549-33sgtd30asvztg2c
2012-08-30 16:35:49 +02:00
Olivier Dony 06e13555d5 [FIX] mail: simplify test and cleanup some code + fix plaintext signature append
bzr revid: odo@openerp.com-20120830122112-y2lbgcazy0opvbs8
2012-08-30 14:21:12 +02:00
Thibault Delavallée bec83eef6f [REF] mail_mail: body_html is back, holding the body of emails to send.
Body of send emails is mail_mail.body_html, not body anymore.
Signature adding is back to mail_followers.notify().
Subject adding is still done just before sending.
Updated mail_mail view. mail.compose.message: body_text inside <pre>. 
[TESTS] mail: added tests for message_post, updated tests for mail.message.compose to test the composer only.

bzr revid: tde@openerp.com-20120830085116-o5h13yqodt0vof0k
2012-08-30 10:51:16 +02:00
Thibault Delavallée 1d131bae84 [RENAME] mail: res.partner: renamed notification_email_pref into notification_email_send, because this pref suffix is very ugly.
bzr revid: tde@openerp.com-20120829114424-fznd0ujsqnk1hve7
2012-08-29 13:44:24 +02:00
Olivier Dony b19d73525d [IMP] mail: implement parent message resolution when parsing incoming message + cleanup lint
bzr revid: odo@openerp.com-20120828173901-8y9y16crvii8d2qg
2012-08-28 19:39:01 +02:00
Thibault Delavallée c791b22a8c [FIX] [TEST] mail_message: added a flattening method, to flatten the result structure of message according to a given number of thread level. Added some tests that go with that feature.
bzr revid: tde@openerp.com-20120828142634-gfsjjih4mr1n2lyt
2012-08-28 16:26:34 +02:00
Thibault Delavallée 720ddfd5c8 [FIX] mail_message: fixed messages that could be present several times in the result structure of message_read.
bzr revid: tde@openerp.com-20120828131311-1z27oxmgcej9qf4m
2012-08-28 15:13:11 +02:00
Thibault Delavallée 115e6f9687 [IMP] [TEST] mail.notification: added an SQL constraint on mail.notification, to have default false value on read column even when writing into the table using write on the partner_ids column of mail.message (therefore by-passing the default_get of the orm for mail_notification model). Added tests for needaction, based on mail.message, that by the way helped trigerred this bug. Hooray.
bzr revid: tde@openerp.com-20120828113128-70gjunh6bx3pho30
2012-08-28 13:31:28 +02:00
Thibault Delavallée f4deb95339 [REV] mail_message: reverted changes on message_read, back to its fist version, except limit that is more usable than an hardcoded one. Added some tests that crash, because message_read is really wrong.
bzr revid: tde@openerp.com-20120827162237-eljqnvenwy0xv5dc
2012-08-27 18:22:37 +02:00
Thibault Delavallée 4d510a3d31 [REF] mail_thread: message_read: re-added old expandable, to have same behavior as 'beofre in this branch'.
bzr revid: tde@openerp.com-20120827150303-ena57f72e3mgwtg2
2012-08-27 17:03:03 +02:00
Thibault Delavallée dc5b8efdf7 [IMP] mail: moved tree formation in message_read in a dedicated method; added / fixed some tests. Note that tests for message_read will have to be added.
bzr revid: tde@openerp.com-20120827144753-csoho4iz34f6zpy1
2012-08-27 16:47:53 +02:00
Thibault Delavallée d19ad1ff4b [TEST] mail: added tests for the composer, includes a first bench of tests for notifications and send emails.
bzr revid: tde@openerp.com-20120824161117-abur02jlgs08my21
2012-08-24 18:11:17 +02:00
Thibault Delavallée 95a66586d9 [REF] [TEST] mail: cleaned the way followers are added to a message partner_ids (done in notify in mail.message) and the way emails are send (done in notify in mail.followers). Composition wizard override mail_message.notify to avoid having partners and sending emails. Also added tests that helped finding some bugs, that will be cleaned tomorrow.
bzr revid: tde@openerp.com-20120823180648-8xpu8qyf7qr6azc2
2012-08-23 20:06:48 +02:00
Thibault Delavallée f3b43da73b [CLEAN] mail: res_partner: removed dead code. Also fixe da typo in mail tests.
bzr revid: tde@openerp.com-20120823131144-xbryqdesfw5ix8y9
2012-08-23 15:11:44 +02:00
Thibault Delavallée 690bc2ece9 [TEST] mail: added tests for the many2many modified field used for follower_ids. Added tests for the subscriber API.
bzr revid: tde@openerp.com-20120823122537-g0m5jtkq67jhuone
2012-08-23 14:25:37 +02:00
Olivier Dony 786419565a [FIX] mail: make basic mail tests pass again, remove useless/dead test code
bzr revid: odo@openerp.com-20120822133028-hms3xfhibhn1j38l
2012-08-22 15:30:28 +02:00
Fabien Pinckaers e18c83106c imp
bzr revid: fp@tinyerp.com-20120820104556-li9wfg2riqb85c8a
2012-08-20 12:45:56 +02:00
Olivier Dony 28148809a1 [IMP] mail.alias: start writing tests, fix detected errors
bzr revid: odo@openerp.com-20120814080421-nn6h3z4v54dl949c
2012-08-14 10:04:21 +02:00