summaryrefslogtreecommitdiff
path: root/addons/test_mail/tests/__init__.py
AgeCommit message (Collapse)Author
2021-04-08[MOV] mail, test_mail: merge and improve composer testsThibault Delavallée
This commits is a bit a followup of odoo/odoo#62061 where new composer tests were added. This commit finalize this work by merging all composer related tests within the same file. It also backports some of tooling update done in odoo/odoo#64459 or odoo/odoo#63677 in order to have coherent naming through 14+ versions. Some additional or deeper tests are added. Notably it now more cleanly uses asserts for created mail.mail and sent emails. Task ID-2500615 COM PR odoo/odoo#68874
2020-11-19[FIX] mail: make the current user member of the created channelDebauche Stéphane
Purpose ======= Before, by default, if a user create a channel, he will not be member of this channel. After, the current user will always be member of the new channel. Task 1963414
2020-11-26[IMP] test_mail: add new mail composer tests for its internalsThibault Delavallée
Purpose is to have some low level tests for composer itself allowing to ensure its behavior. We add tests notably about default values computation in mass mailing mode as well as template_id change and values synchronization in composer model. In a near future composer will probably be improved (use computed fields, rewrite part of its logic to improve performances). Having tests done before those tasks ensure we notice every change that might happen. Task ID-2390314 PR odoo/odoo#62061
2020-09-29[FIX] mail: fix tour to allow public or private channel selectionSébastien Theys
task-2313321 closes odoo/odoo#58778 X-original-commit: f6a561a7e21772c6a25785c8b2428954d4bd152e Signed-off-by: Sébastien Theys (seb) <seb@odoo.com> Signed-off-by: Alexandre Kühn (aku) <aku@odoo.com>
2020-04-22[MOV] (test_)mail(_full): redispatch some tests and split test mail models fileThibault Delavallée
PURPOSE Have a cleaner test_mail addons SPECIFICATIONS Keep only mail-related tests, move odoobot in test mail full, send "update notification" tests in mail (specific to mail). Merge some test files to lessen number of files, perform light file renaming. Split test mail models file to prepare some cleaning in those models and tests. LINKS Prepares Task ID 2238597 (clean notification models) Prepares Task ID 2083854 (improve mass mailing technical flows) PR #49891
2019-09-06[MOV] test_mail: split cc tests to either discuss or mailgateway testsThibault Delavallée
PURPOSE In order to rewrite some tests, remove low-level tests and add coverage first step is to reorganize a bit test_mail content. Several tests cases are spread among several files and finding back some feature coverage tests is not easy. SPECIFICATIONS Split cc tests to either discuss or mail gateway tests. It allows to remove an unnecessary file. LINKS Task 1958697
2019-09-06[MOV] test_mail: split post and composer testsThibault Delavallée
PURPOSE In order to rewrite some tests, remove low-level tests and add coverage first step is to reorganize a bit test_mail content. Several tests cases are spread among several files and finding back some feature coverage tests is not easy. SPECIFICATIONS Reorganize tests, notably * put message_post related test in test_message_post; * have only composer related test in test_message_compose(r); * put alias tests in test_mail_gateway; * move some discuss tests to post tests as they are linked to notification details, not really Discuss features. LINKS Task 1958697
2019-09-06[MOV] test_mail: rename some test filesThibault Delavallée
PURPOSE In order to rewrite some tests, remove low-level tests and add coverage first step is to reorganize a bit test_mail content. Several tests cases are spread among several files and finding back some feature coverage tests is not easy. SPECIFICATIONS * put channel moderation tests in test_mail_channel; * rename resend to message management; * rename multi company test to redirect tests: LINKS Task 1958697
2019-09-06[REF] test_mail: lessen data created by defaultThibault Delavallée
PURPOSE In order to rewrite some tests, remove low-level tests and add coverage first step is to reorganize a bit test_mail content. Several tests cases are spread among several files and finding back some feature coverage tests is not easy. SPECIFICATIONS Quickly clean common class and lessen data creation by default. Offer some tool methods, notably to create portal users used in some tests but not all, or to create mail templates. LINKS Task 1958697
2019-05-29[IMP] test_mail: Add multi company test from _redirect_to_recordYannick Tivisse
2019-03-28[IMP] mail, test_mail, *: add new email.cc.mixin on main modelsXavierDo
*: crm, project, maintenance, hr_recruitment When a record is created from an email, cc can be lost. This commit proposes a new mixin to keep cc on the record and allows to create partner for each of them when sending a message from the chatter. The mixin is added on the mail recors that can be created from mail.alias: document helpdesk.ticket mrp.eco quality.alert hr.applicant crm.lead project.task mail.channel maintenance.equipment Task: 1925001
2018-10-22[MERGE] forward port branch saas-11.4 up to 3c108977c1eChristophe Simonis
2018-10-18[FIX] mail: avoid concurrent update of notificationsXavierDo
When sending notifications by batch one notification email can be send up to 50 people. For one mail_mail entry to handle 50 emails can be sent as those are sent independently for each recipient. In some cases a bounce may occur while the whole batch of recipients is not completely mailed. In that case the mailgateway will update the notification status to bounced. When the cron finishes to send the whole batch of emails it tries to update the notifications of all recipients. However as a notification has already been updated due to the bounce we face a concurrent update, meaning the transaction is rollbacked. Emails have been sent but notifications are not considered as sent as they have not been updated accordingly. Next time the cron runs it will send the same batch again, with probably the same bounce and rollback. We could therefore face an email loop. This commit add test for this use case. This commit is linked to task ID 1893054.
2018-08-10[ADD] mail_bot, im_livechat_mail_bot: add Odoobot, your new best friendXavierDo
Purpose of this commit is to improve onboarding with a wow effect and a bot to test the Discuss app. Otherwise new users have nobody to talk to. Retention will be improved by both increasing interactions and onboarding of Discuss features. This commit adds a simple bot in discuss. It answers some questions, helps users getting their hand on discuss and eases the onboarding. In this version, the flow is quite simple, and only im_livechat adds some logic in order to show canned response. The logic is contained in new modules: mail_bot and im_livechat_mail_bot in order to keep everything well separated. It also allows users to remove the mailbot if they do not want to keep this functionality. Odoobot will only answer if he is in the onboarding conversation (alone with a user in a channel of type chat) or if a user pings odoobot. Odoobot logic applies to both standard chatter / channel messages and also transient messages (like help commands). Specifications * 2 minutes after first sign in, users will receive a direct chat from Odoobot; * make Odoobot an archived partner; * scenario * Odoobot: "Hello, I'm here to help you discover chat features. Try answering me with an emoji :)"; * User: Send emoji * Odoobot: "Great! :) Did you notice that you can also send attachments, like a picture of your cute dog? Try it!" * Odoobot: "Not a cute dog, but you get it :) To access special features, start your sentence with "/" (I.E. /help)"" * User: /help * Auto message then Odoobot: "Wow you're a natural! As a channel usually contain a lot of users, you can grab the attention with a ping. Try to ping me with @Odoobot!" * User: @Odoobot lorem ipsum * if Livechat installed * add 2 demo canned response so it does not look weird (like "Hello, how may I help you?" and "Have a nice day!") * Odoobot: "Perfect! <br> Try to type ":" to use canned responses." * User tries canned * Odoobot: "Good, you can customize your canned responses in the live chat application. <br><br> + réponse suivante" * Odoobot: "There's 3 different ways in Odoo to interact with your colleagues: via this chat window, [img of chat window] via the Discuss application [img of Discuss app + icon on it] or via the chatter [img of the chatter]. Aaaaand that's it! Enjoy discovering Odoo! :)" * random answers to ping/bad answer * "Mmmmh I'm not sure what you mean.. Can you try again?" * "I'm afraid I don't understand. Sorry!" * when someone pings @OdooBot with no reason: Odoobot: Yaaaay that's me! [party emoji] * fun stuff to add for some answer * User: i love you / love * Odoobot: Aaaaaw that's really cute but, you know, bots don't work that way. You're too human for me! Let's keep it professional <3 * User: Fuck * Odoobot: That's not a really nice thing to say, you know? I'm a bot but I have feelings, ok?! </3 This commit is linked to task ID 1838588 and PR #25075.
2018-06-07[ADD] mail, mass_mailing: allow a user to resend a mail with failuresXavierDo
When a mail is in failure state, a red envelope appears next to the message in a thread but it was difficult to send the mail again. This tasks will allow users to send mail again easily, or mark notification as cancelled if the user want to ignore this failure. A notification will appear in sender systray while mail are in failure. Task: #46158 PR: #24628
2018-06-06[IMP] mail: add moderation on channelsMathieu Duckaerts-Antoine
Purpose of this commit is to allow moderation on incoming messages in discussion channels. On some channels on which moderation is required messages should be in a pending moderation stage. Moderators can accept or refuse messages as well as always allow or ban messages coming from a given set of emails. Channels now have an option to be moderated. Moderators can be added on channels. They have access to a specific UI in Discuss to see and take action on messages waiting for moderation. Concerning mail.thread message that are pending moderation are not notified. It means nobody receives a notification about them. Moderation process calls the notification once the message is validated. Various features included in this commit : * a model is added to store the decision about emails, allow or ban; * access rights are updated so that only moderators can modify moderation fields on message; * specific bus notifications are send to moderated people as well as to moderators on incoming emails as well as when a decision is taken; * options are added on channels to send explanations to moderated emails; * options are added on channels to write and send guidelines explaining why and how moderation is performed; * a reminder is send daily to moderators with remaining messages to moderate; * discuss UI is adapted and a new channel is added below Inbox and Starred giving access to moderation tools; * chanenl UI is adapted allowing to moderate directly inside channels; This commit is linked to task ID 29521. Closes #21921.
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.