summaryrefslogtreecommitdiff
path: root/addons/test_mail/data
AgeCommit message (Collapse)Author
2019-03-29[IMP] mail, *: don't track fields at createXavierDo
*: project, crm, maintenance, helpdesk, It is useless to track fields during create since they have no initial value and future tracking message will show changes on tracked field. We can log a default creation message instead (as it is now if there is no mail_create_nolog context key) This change will implies - less queries when creating record - cleaner creation messages - less occurence of mail_create_nolog ctx key Removing tracking at create could break the creation subtypes mechanism (example: following task creation subtype on project) Instead of using _track_subtype to give a subtype at create, a new _creation_subtype method can be override. If a creation subtype is set on a specific modlel, creation messages will be create by message_post instead of _message_log. We also need to adapt the message_track_post_template in order to keep this feature whithout tracking. Task: #1916916 closes odoo/odoo#31945 Signed-off-by: Thibault Delavallee (tde) <tde@openerp.com>
2018-05-17[MERGE] forward port branch saas-11.2 up to 16552029241Christophe Simonis
2018-05-17[MERGE] forward port branch 11.0 up to 59a8a1cd8eeChristophe Simonis
2018-05-14[MERGE] forward port branch saas-11.2 up to e70e5b6cf33Christophe Simonis
2018-05-14[MERGE] forward port branch 11.0 up to 2787de8c68fChristophe Simonis
2018-03-27[IMP] mail: add tool methods to manage activities directly from the mixinThibault Delavallée
This commit adds tools methods related to activities in the mail.activity mixin. It gives to models inheriting from the activity mixin an easy-to-use API to schedule, unlink or mark activities as done. Purpose of those methods is to avoid having people manually managing activities in the code to hide the technical details of the activities model, notably access rights or activity types. A field is added on activity model to indicate they have been generated automatically. This way when rescheduling or unlinking based on some specific activity types we do not change user-created activities. Those methods include scheduling activities, changing their dates, marking them as done or unlinking them. Future commits will use those methods in various addons to automatically generate activities based on workflow we want to implement. This commit also adds tests for the newly added code. Future commits should probably have a look at activity security and add some tests cases to check it is correctly taken into account. It is considered a bit out of scope for this task. Thanks to @jem-odoo for its in-depth review of this commit. Well thanks for other commits also.
2018-03-09[IMP] test_mail: add performance tests to cover more separate featuresThibault Delavallée
This commit is a manual forward-port of saas-11.2's 42659dc70c2b9b124e7e4fdc0449f660c3de5c76 . In test_mail there are performance tests involving several followers and give counters for some heavy real-life-like use cases. Purpose of this commit is to have more basic performance tests for main mail features, like simple post, simple subscription of one follower. It allows to have an idea of the basic cost of various features. Adding use cases for message_post includes * posting without followers (aka, no notification) * posting with a ping (by email or by inbox) * logging a note with optimized method _message_log or with message_post Adding use cases for activities includes setting an activity as done. This action posts a message and is therefore interesting to evaluate. Adding use cases for subscription includes * adding and re-adding one follower, with default or specified subtypes * updating responsible field triggering a simple tracking and an assignation email or notification (not completely supported in saas 11.2 meaning this counter will increase when forward-ported) * note that some subscription tests have already been added at a01933c9b4dc6ff4e1a0b73822df9097025c0e1c Finally some heavier tests are added for assignation and tracking based on QWeb view. This commit is related to task ID 1824965 . This one is an ongoing task and several commits may be linked to that task.
2018-03-09[IMP] test_mail: add performance tests to cover more separate featuresThibault Delavallée
In test_mail there are performance tests involving several followers and give counters for some heavy real-life-like use cases. Purpose of this commit is to have more basic performance tests for main mail features, like simple post, simple subscription of one follower. It allows to have an idea of the basic cost of various features. Adding use cases for message_post includes * posting without followers (aka, no notification) * posting with a ping (by email or by inbox) * logging a note with optimized method _message_log or with message_post Adding use cases for activities includes setting an activity as done. This action posts a message and is therefore interesting to evaluate. Adding use cases for subscription includes * adding and re-adding one follower, with default or specified subtypes * updating responsible field triggering a simple tracking and an assignation email or notification (not completely supported in saas 11.2 meaning this counter will increase when forward-ported) * note that some subscription tests have already been added at a01933c9b4dc6ff4e1a0b73822df9097025c0e1c Finally some heavier tests are added for assignation and tracking based on QWeb view. This commit is related to task ID 1824965 . This one is an ongoing task and several commits may be linked to that task.
2017-12-12[IMP] test_mail: move some data into demo and update tests accordinglyThibault Delavallée
Creating data directly in tests was done when tests were located in mail module to avoid creating real data or demo. Now that mail tests have their own module we can create demo data and use them in tests. It is simpler to have demo data for things like subtype and email templates to ease understanding and reuse.
2017-12-01[MERGE] forward port branch 11.0 up to c201cf2b77cChristophe Simonis
2017-11-29[MOV] (test_)mail: move tests into their dedicated moduleThibault Delavallée
Purpose: avoid having useless tables for test models in a production environment.
2017-11-29[SPLIT] test_performance: split between base and mail performance testsThibault Delavallée
Test performance will now hold the base class for performance tests as well as tests related to the ORM, depending only on base. A new module test_mail is introduced at this commit that contains performance tests related to mail module. This commit contains only code move and should not impact anything. Future commits will move mail tests into test_mail so that all mail related tests are located in the same optional module. This allows notably to avoid creating a lot of unnecessary tables when installing mail module on production databases.