[17.0][FIX] mail_activity_board: fix computing related_model_instance - #1875
Open
astirpe wants to merge 1 commit into
Open
[17.0][FIX] mail_activity_board: fix computing related_model_instance#1875astirpe wants to merge 1 commit into
astirpe wants to merge 1 commit into
Conversation
astirpe
marked this pull request as draft
June 19, 2026 10:48
astirpe
force-pushed
the
17_fix_mail_activity_board
branch
from
June 19, 2026 11:06
baf067f to
f231ba4
Compare
astirpe
marked this pull request as ready for review
June 19, 2026 11:13
hbrunn
requested changes
Jun 22, 2026
astirpe
force-pushed
the
17_fix_mail_activity_board
branch
from
June 26, 2026 11:29
f231ba4 to
da4d523
Compare
hbrunn
reviewed
Jun 26, 2026
Comment on lines
+33
to
+35
| record.related_model_instance = ( | ||
| f"{record.res_model},{record.res_id}" | ||
| ) |
Member
There was a problem hiding this comment.
shouldn't it be enough to wrap this?
Member
Author
There was a problem hiding this comment.
It's not enough, it would reintroduce the crash we are trying to fix.
The original crash didn't occur during the compute method, which didn't fail itself. The crash would simply happen a moment later: when the web client tries to render the view, it attempts to fetch the target record's display name.
Member
There was a problem hiding this comment.
but when will the else branch of this conditional throw any of the errors you catch here?
Member
Author
There was a problem hiding this comment.
you are right, I just moved the else branch to outside the try-catch, thanks!
astirpe
force-pushed
the
17_fix_mail_activity_board
branch
from
June 29, 2026 06:16
da4d523 to
37e41d2
Compare
… for restricted access
astirpe
force-pushed
the
17_fix_mail_activity_board
branch
from
June 30, 2026 06:10
37e41d2 to
3c4b513
Compare
hbrunn
approved these changes
Jun 30, 2026
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.
Issue: Loading the chatter crashes with a ValueError if a user lacks read access to an activity's related model. This happens because Odoo's ORM strictly validates assignments to Reference fields and rejects the restricted model.
Fix: Added a check inside _compute_related_model_instance. If the user cannot read the target model, the field safely defaults to False instead of crashing the entire view.