[FIX] base_comment_template: Search by model_ids.model
Steps:
- Search comment templates using the domain [("model_ids.model", "=", "your_model")]
Actual behavior: Nothing is found
Expected behavior: Comments for model your_model are found
The modified method comes from https://github.com/OCA/reporting-engine/commit/d9d2ef5b2731ba312e6274ea162caa2183d0ccbb and https://github.com/OCA/reporting-engine/commit/1f6bb667db1105d7cc33bbad83f27c2aeda7ccb7, maybe the authors @victoralmau and @AaronHForgeFlow would like to have a look?
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.
Rebased on 16.0
There hasn't been any activity on this pull request in the past 4 months, so it has been marked as stale and it will be closed automatically if no further activity occurs in the next 30 days. If you want this PR to never become stale, please ask a PSC member to apply the "no stale" label.
Rebased on 16.0
How you do the searching? I tested in the comment template list and I can search by model successfully without this change.
How you do the searching? I tested in the comment template list and I can search by model successfully without this change.
Thanks for having a look! I'm searching with
self.env["base.comment.template"].search(
[
("model_ids.model", "=", user_model_name),
]
)
as it's done in the added test; you can also check that the test fails without the other changes
Sure, I just wanted to know if there was a way to test this as a user in Odoo. In any case as long as I can still search by model in the comment template list view in Odoo I am fine with this change.
Just one thing, I think you can add yourself as contributor in the CONTRIBUTORS.rst file, but changing the copyright requires big changes on the module,I don't think thi sis the case.
Just one thing, I think you can add yourself as contributor in the CONTRIBUTORS.rst file
Right, thanks, I added myself to CONTRIBUTORS.
changing the copyright requires big changes on the module,I don't think thi sis the case.
I usually add myself in any file I edit, no matter how big the change is; I believe it means these people agree with its copyright and even if I added only one line to this file I need to agree with its copyright.
I don't mind it. But there's some discussion is the OCA in regards that: https://github.com/orgs/OCA/discussions/185
Indeed the copyright lines does not mean much: https://github.com/orgs/OCA/discussions/185#discussioncomment-10656634