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

[16.0][FIX] partner_multi_relation: fix name search on relation #1740

Merged
merged 1 commit into from
Dec 30, 2024

Conversation

NL66278
Copy link
Contributor

@NL66278 NL66278 commented Apr 18, 2024

Before this fix the following exception was logged (and the search not done):

2024-04-18 13:13:15,110 320 ERROR vwnvrs-testdatabase odoo.osv.expression: Non-stored field res.partner.relation.type.selection.display_name cannot be searched. 
NoneType: None

After fix no more errors in the log and the search works.

@SirAionTech
Copy link
Contributor

Could you please explain how to obtain this error?
I tried to search for a relation in its Many2one field but the search is performed correctly and no ERROR is logged.

@NL66278
Copy link
Contributor Author

NL66278 commented Aug 27, 2024

@SirAionTech The error occurs if you have a model with a Many2one field to res.partner.relation.all, and then in the form you enter a name to search on.

Copy link
Contributor

@SirAionTech SirAionTech left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR!
I had a look at the code and tested this change as you suggested in #1740 (comment):

The error occurs if you have a model with a Many2one field to res.partner.relation.all, and then in the form you enter a name to search on.

Everything looks fine.

Could you please add a test that fails without this fix? Searching for records is a feature I'd say is worth protecting from regression.

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 Dec 29, 2024
@NL66278
Copy link
Contributor Author

NL66278 commented Dec 30, 2024

/ocabot merge minor

@OCA-git-bot
Copy link
Contributor

Hey, thanks for contributing! Proceeding to merge this for you.
Prepared branch 16.0-ocabot-merge-pr-1740-by-NL66278-bump-minor, awaiting test results.

@OCA-git-bot OCA-git-bot merged commit cccc516 into OCA:16.0 Dec 30, 2024
6 of 7 checks passed
@OCA-git-bot
Copy link
Contributor

Congratulations, your PR was merged at ab50512. Thanks a lot for contributing to OCA. ❤️

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
merged 🎉 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.

3 participants