[18.0][FIX] base_comment_template: fix tests#1142
Open
AungKoKoLin1997 wants to merge 1 commit intoOCA:18.0from
Open
[18.0][FIX] base_comment_template: fix tests#1142AungKoKoLin1997 wants to merge 1 commit intoOCA:18.0from
AungKoKoLin1997 wants to merge 1 commit intoOCA:18.0from
Conversation
yostashiro
approved these changes
Mar 9, 2026
Member
yostashiro
left a comment
There was a problem hiding this comment.
Confirmed locally that the patch fixes the test error.
| super().setUpClass() | ||
| setup_test_model(cls.env, ResUsers) | ||
| res_users_model = cls.env.registry["res.users"] | ||
| # Register the comment_template_ids field added by comment.template mixin |
Member
There was a problem hiding this comment.
We may add a reference to odoo/odoo#247151 to provide more context.
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.
Odoo 18 introduced stricter test validation (odoo/odoo@de056cc#diff-80aef099e5fb41cc09e699d35b749152aca50caf5b0bc16c400081c29023fbec) that checks for unexpected attributes added to models during tests. Our tests extend the existing
res.usersmodel with thecomment.templatemixin, which addscomment_template_idsand causesAssertionError: Found unexpected attributes on res.users: comment_template_ids.I fixed by registering the mixin attribute using
classPatch(). If anyone has a cleaner solution, suggestions are welcome!@qrtl QT6451