[19.0][MIG] mail_notify_employee_leave: Migration to 19.0#228
Open
GuillermoNforgeflow wants to merge 7 commits into
Open
[19.0][MIG] mail_notify_employee_leave: Migration to 19.0#228GuillermoNforgeflow wants to merge 7 commits into
GuillermoNforgeflow wants to merge 7 commits into
Conversation
Currently translated at 100.0% (9 of 9 strings) Translation: mail-17.0/mail-17.0-mail_notify_employee_leave Translate-URL: https://translation.odoo-community.org/projects/mail-17-0/mail-17-0-mail_notify_employee_leave/it/
d2c89f6 to
5ecc9a8
Compare
5ecc9a8 to
560bf0b
Compare
6651da4 to
23a86bb
Compare
23a86bb to
51691af
Compare
GuillemCForgeFlow
approved these changes
Jul 7, 2026
GuillemCForgeFlow
left a comment
Contributor
There was a problem hiding this comment.
code review lgtm 👍🏿
Comment on lines
+15
to
+17
| # During tests, don't defer unless a test explicitly opts in | ||
| if config["test_enable"] and not self.env.context.get("test_mail_post_defer"): | ||
| return super()._notify_thread(message, msg_vals=msg_vals, **kwargs) |
Contributor
There was a problem hiding this comment.
this solution makes sense 👍🏿 otherwise we are deferring also in tests, which we only want to do when explicitly checking in tests, such as in the actual module's tests
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
mail_tracking's test_access_tracking_email failed on this branch because deferred notifications aren't sent synchronously: the test posts a message and immediately checks the mail.tracking.email, which doesn't exist yet when mail_post_defer defers it. (The test only runs when hr is installed, which is the case here)
Fix: mail_post_defer now skips deferring under test_enable unless a test opts in via the test_mail_post_defer context key. Its own tests set that key to keep testing the deferral. No changes needed in mail_tracking.