Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[FIX] base_comment_template: Search by model_ids.model #863

Open
wants to merge 1 commit into
base: 16.0
Choose a base branch
from

Conversation

SirAionTech
Copy link

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 SirAionTech marked this pull request as ready for review March 15, 2024 11:35
@SirAionTech
Copy link
Author

The modified method comes from d9d2ef5 and 1f6bb66, maybe the authors @victoralmau and @AaronHForgeFlow would like to have a look?

@SirAionTech SirAionTech force-pushed the 16.0-fix-base_comment_template-search_path branch from 1c521f3 to 8e0edda Compare March 15, 2024 12:18
@SirAionTech SirAionTech marked this pull request as draft March 15, 2024 13:01
@SirAionTech SirAionTech force-pushed the 16.0-fix-base_comment_template-search_path branch 2 times, most recently from 897e5b5 to 30f7241 Compare March 15, 2024 13:28
@SirAionTech SirAionTech marked this pull request as ready for review March 15, 2024 13:29
Copy link

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 github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jul 14, 2024
@SirAionTech SirAionTech force-pushed the 16.0-fix-base_comment_template-search_path branch from 30f7241 to fb557a5 Compare July 15, 2024 07:34
@SirAionTech
Copy link
Author

Rebased on 16.0

@github-actions github-actions bot removed the stale PR/Issue without recent activity, it'll be soon closed automatically. label Jul 21, 2024
Copy link

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 github-actions bot added the stale PR/Issue without recent activity, it'll be soon closed automatically. label Nov 24, 2024
@SirAionTech SirAionTech force-pushed the 16.0-fix-base_comment_template-search_path branch from fb557a5 to 4e0c464 Compare November 26, 2024 08:44
@SirAionTech
Copy link
Author

Rebased on 16.0

@AaronHForgeFlow
Copy link
Contributor

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

@SirAionTech
Copy link
Author

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

@AaronHForgeFlow
Copy link
Contributor

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
Copy link
Contributor

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.

@SirAionTech
Copy link
Author

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 SirAionTech force-pushed the 16.0-fix-base_comment_template-search_path branch from 4e0c464 to 20cd8fb Compare November 26, 2024 10:13
@AaronHForgeFlow
Copy link
Contributor

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale PR/Issue without recent activity, it'll be soon closed automatically.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants