reporting-engine icon indicating copy to clipboard operation
reporting-engine copied to clipboard

[FIX] base_comment_template: Search by model_ids.model

Open SirAionTech opened this issue 1 year ago • 12 comments

Steps:

  1. 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

SirAionTech avatar Mar 15 '24 11:03 SirAionTech

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?

SirAionTech avatar Mar 15 '24 11:03 SirAionTech

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.

github-actions[bot] avatar Jul 14 '24 12:07 github-actions[bot]

Rebased on 16.0

SirAionTech avatar Jul 15 '24 07:07 SirAionTech

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.

github-actions[bot] avatar Nov 24 '24 12:11 github-actions[bot]

Rebased on 16.0

SirAionTech avatar Nov 26 '24 08:11 SirAionTech

How you do the searching? I tested in the comment template list and I can search by model successfully without this change.

AaronHForgeFlow avatar Nov 26 '24 09:11 AaronHForgeFlow

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

SirAionTech avatar Nov 26 '24 09:11 SirAionTech

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.

AaronHForgeFlow avatar Nov 26 '24 09:11 AaronHForgeFlow

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.

AaronHForgeFlow avatar Nov 26 '24 09:11 AaronHForgeFlow

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.

SirAionTech avatar Nov 26 '24 10:11 SirAionTech

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

AaronHForgeFlow avatar Nov 26 '24 10:11 AaronHForgeFlow