Commit Graph

174 Commits

Author SHA1 Message Date
Christophe Matthieu 576d664f88 [IMP] note: stage by user, group by stage, access rules
bzr revid: chm@openerp.com-20120913171938-0zmtm2ds5mjdgttj
2012-09-13 19:19:38 +02:00
Olivier Dony 20c8d13822 [FIX] mail.message: default order by `id` should work on expandable node as well - but this still looks ugly
bzr revid: odo@openerp.com-20120905234919-ty9eojpgyib3ohwd
2012-09-06 01:49:19 +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
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
Thibault Delavallée 6838e9193b [FIX] mail_message: fixed typo.
bzr revid: tde@openerp.com-20120904121802-7lbajrbon7f83vux
2012-09-04 14:18:02 +02:00
Thibault Delavallée 1974375c92 [IMP] hr_evaluation: send remainder email now uses context values to set some default values when sending an email. This is a basic fix of missing feature due to hr_evaluation/wizard/mail_compose_message override. Updated classic form view of mail.compose.message. Not sure it is usefull to keep two form (one classic and one Chatter)... maybe there is something to do here.
bzr revid: tde@openerp.com-20120904115416-zuvna57r3oj37hpu
2012-09-04 13:54:16 +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 a58d50225c [FIX] mail_message: fixed message_read. Issue was coming from 'expandable' messages, that are there for displaying the threads, but should not be processed.
bzr revid: tde@openerp.com-20120831131503-gvypj0z1jykjkpk9
2012-08-31 15:15:03 +02:00
Thibault Delavallée 86dd3bdc57 [FIX] mail_message: fixed and simplified unread messages query. Added an index on the read column of mail_notification.
bzr revid: tde@openerp.com-20120831112353-egmeetrnecp2kflp
2012-08-31 13:23:53 +02:00
Thibault Delavallée 3cc186cd41 [IMP] mail.message: check is now a check_access_rule override, allowing to remove explicit calls. Moved mail.notification inheritance in mail.message directly into mail.notification, because we are in the same module (no need to separate things too much when in the same module).
bzr revid: tde@openerp.com-20120831090120-s56984dg6wpbs0li
2012-08-31 11:01:20 +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
Olivier Dony d8c65aa88e [IMP] mail.notification: simplify model creation + some lint cleanup
No need for extra constraints/defaults, in OpenERP
boolean values are `true` and `not true` (false/NULL).

This seems to work well with db indexes too.

bzr revid: odo@openerp.com-20120829164614-9kqrownb7q4vzrjc
2012-08-29 18:46:14 +02:00
Thibault Delavallée 9b6379462b [REF] mail_mail: cool and clean refactoring of the models.
Removed body_html and content_subtype fields. We now entirely
rely on the body field, that holds sanitized HTML.
Added a user_signature field from email_template. mail_mail.send()
is now responsible of adding the signature on emails.
mail_notification.notify() sets the user_signature flag on
emails send for notifciations.
mail_mail.send() is responsible of adding a default subject
on emails send if there is no subject on the mail.message,
and res_id and model are set.
purchase_requisition: removed an override of mail.message
schedule_with_attach.

bzr revid: tde@openerp.com-20120829150002-v8t581oesnw0rhvl
2012-08-29 17:00:02 +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 fe03a7f1ed [FIX] mail_message: fixed _get_unread, because of an unitialized dict; mail_followers: fixed a wrong parameters order.
bzr revid: tde@openerp.com-20120828150244-vcpxj2nroc8esjzk
2012-08-28 17:02:44 +02:00
Thibault Delavallée a3fbc61638 [FIX] mail_message: fixed a typo.
bzr revid: tde@openerp.com-20120828143754-206i4tg4u8ochmpx
2012-08-28 16:37:54 +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 481bdd269f [IMP] mail.message: added an 'unread' functional searchable field. This field is used to replace the buggy needaction_domain_get on mail.message (having 2 notifications with 1/ correct partner 2/ unread could lead to false needaction, because of verified domain. The domain is now based on the unread field, that computes unread messages for the user. To avoid having too much overhead, it has been implemented directly in sql.
bzr revid: tde@openerp.com-20120828095323-3tb01d7vaoa0m9rb
2012-08-28 11:53:23 +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 9e3184ad33 [CLEAN] mail_message: get_record_name and name_get now use a dedicated function to truncate names. Moved arbitrary '18' into a variable.
bzr revid: tde@openerp.com-20120827094228-xl2i88lhqgn0fw04
2012-08-27 11:42:28 +02:00
Olivier Dony f4c2bd121f [IMP] mail.compose.message: cascade delete attachments upon vacuum-clean
bzr revid: odo@openerp.com-20120824112312-zs5raruc4qdprlnp
2012-08-24 13:23:12 +02:00
Olivier Dony 2c4ed841b9 [FIX] mail: make message_process/parse work, restore attachment_ids m2m on mail.message, various lint cleanup
bzr revid: odo@openerp.com-20120823185443-zsnm6g14r6e42y3i
2012-08-23 20:54:43 +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
Fabien Pinckaers 462fc03987 fix
bzr revid: fp@tinyerp.com-20120823155747-0ysezcil7hcy1sv0
2012-08-23 17:57:47 +02:00
Thibault Delavallée 4de99bff8d [IMP] mail.js: Hide in wall now sets the notification as read. Added server code to handle the client-side link. Also fixed composer, when replying to an email. Began to propagate the use of context for some values instead of everything in options, in js code.
bzr revid: tde@openerp.com-20120822172346-zih62h6wgrev22cd
2012-08-22 19:23:46 +02:00
Fabien Pinckaers c8851c2967 [IMP] fixed size
bzr revid: fp@tinyerp.com-20120822163824-t3lj4rjt2mvnp74v
2012-08-22 18:38:24 +02:00
Fabien Pinckaers 4fdb70d12a fix
bzr revid: fp@tinyerp.com-20120822133723-k5r76cty7dej5kjh
2012-08-22 15:37:23 +02:00
Fabien Pinckaers 2f9f57cc46 [IMP] removing some FP Note
bzr revid: fp@tinyerp.com-20120822083608-2q98p1758erm8f7t
2012-08-22 10:36:08 +02:00
Thibault Delavallée 24651a903b [IMP] mail.compose.message: added body_text filed, for plain-text; updated composer accordlingly, removed some dead code/css classes.
bzr revid: tde@openerp.com-20120821144930-ucgmx8rwasamhpgp
2012-08-21 16:49:30 +02:00
Thibault Delavallée 169c8055ba [REF] mail.compose.message: removed extended mode, because not really usefull. Removed reference to that mode in addons (crm lead, crm claim, crm helpdesk, hr evaluation, hr recruitement, project issue). Completely removed the wizard directory in hr_evaluation: mail_compose_message will become a button (TODO), and other files were not called anymore in init/openerp files.
bzr revid: tde@openerp.com-20120821142747-q9drv71749opusr1
2012-08-21 16:27:47 +02:00
Thibault Delavallée 00eed0590e [CLEAN] mail.js: continuing cleaning. Removed commented code, now not necessary.
bzr revid: tde@openerp.com-20120821121030-7qbr54wra11oeen2
2012-08-21 14:10:30 +02:00
Thibault Delavallée 5872ed6bd3 [WIP] [CLEAN] mail.js: continuing the cleaning and refactoring. Wall and recordthread seems to basically work (not the 'fetch more' feature). Cleaned function name, duplicate code, ...
bzr revid: tde@openerp.com-20120821104345-1ithukovq0a1tv76
2012-08-21 12:43:45 +02:00
Fabien Pinckaers 11ab424912 [IMP]
bzr revid: fp@tinyerp.com-20120820191058-kpjymskvxdasoq6c
2012-08-20 21:10:58 +02:00
Thibault Delavallée 9ea504a53a [WIP] mail.js: removed dead code about generic chatter functions (regular expressions, internal links, ...).
bzr revid: tde@openerp.com-20120820161547-saqw5ay01mlyuq7l
2012-08-20 18:15:47 +02:00
Fabien Pinckaers 7a2e5962ab fix
bzr revid: fp@tinyerp.com-20120820113210-4lxap11yk9xxkv9d
2012-08-20 13:32:10 +02:00
Fabien Pinckaers b7c078b651 [IMP] some fixes
bzr revid: fp@tinyerp.com-20120820113150-bgcsylj7k64s26iq
2012-08-20 13:31:50 +02:00
Fabien Pinckaers 1d4dbc3440 [IMP] message_read
bzr revid: fp@tinyerp.com-20120820105749-y5fqaztvj5put395
2012-08-20 12:57:49 +02:00
Fabien Pinckaers 7fc19eba99 [IMP] removed ancestror, merged with thread level
bzr revid: fp@tinyerp.com-20120820104500-8m246hwoexejjobt
2012-08-20 12:45:00 +02:00
Fabien Pinckaers 3169475b3e [IMP] message_read on mail.message
bzr revid: fp@tinyerp.com-20120820101434-429mgbhbuk1wjqa2
2012-08-20 12:14:34 +02:00
Fabien Pinckaers 7a44634a38 [IMP] message_read with ancestrors and threads and expandable domains
bzr revid: fp@tinyerp.com-20120820093922-b3aokqftfcptwmpp
2012-08-20 11:39:22 +02:00
Fabien Pinckaers f73372e7a2 [IMP] better implementation of message read, no ancestror yet
bzr revid: fp@tinyerp.com-20120820090636-gyyp3n47sjs0fbhc
2012-08-20 11:06:36 +02:00
Fabien Pinckaers a2961cbdc3 mail_refactor
bzr revid: fp@tinyerp.com-20120817130126-ldiw28gs13rvf2ka
2012-08-17 15:01:26 +02:00
Fabien Pinckaers 043dc83d20 [IMP] mails
bzr revid: fp@tinyerp.com-20120817125004-wcchhac2cvxuf93i
2012-08-17 14:50:04 +02:00
Fabien Pinckaers 06f60b3517 [FIX] body_text --> body, not ure it's good enough
bzr revid: fp@tinyerp.com-20120817120606-t97l9x2dguuv7kmp
2012-08-17 14:06:06 +02:00
Fabien Pinckaers 63c0cbfc17 [IMP] mail installs
bzr revid: fp@tinyerp.com-20120817112418-037118wnayik229c
2012-08-17 13:24:18 +02:00
Fabien Pinckaers 6ac583c0f7 [IMP] mail cleaning
bzr revid: fp@tinyerp.com-20120817111936-2d33nlqlbvkjb374
2012-08-17 13:19:36 +02:00