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

17.0 base_multi_company missing record in search more option #786

Open
captivea-darshan opened this issue Feb 26, 2025 · 0 comments
Open
Assignees
Labels

Comments

@captivea-darshan
Copy link

Module

The name of the module that has a bug.
Module : 'base_multi_company'

Describe the bug

A clear and concise description of what the bug is.
When we search the record on any many2one field the records get search but when I try for search more option such records are not visible on the search more view.

I face this issue on contact search and I have installed 'base_multi_company' and 'partner_multi_company' module both. But this issue can be fixed on 'base_multi_company' module.

SOLUTION : Instead of search method that is used in abstract class use '_search' method with proper argument.
This will fix the issue.

To Reproduce

Affected versions:

Steps to reproduce the behavior:

  1. create a few contact records.
  2. Install 'base_multi_company' and 'partner_multi_company' modules
  3. Make sure there is no value set on the companies(many2many) field on contact after installing the module.
  4. Go to invoice, and search contact on customer fields you will find a contact in the dropdown list.
  5. Click on the search more option, which will redirect to the contact list view popup. I just wanted to let you know that such contact will not be looked at.

Expected behavior
A clear and concise description of what you expected to happen.
The contact or any other object records must be displayed on the search more option

Additional context
Add any other context about the problem here. (e.g. OS, Python version, ...)
I did find the solution just replace the 'def search()' method with the 'def _search()' method with proper argument.

E.g.,
@api.model
def _search(self, domain, offset=0, limit=None, order=None, access_rights_uid=None):
new_domain = self._patch_company_domain(domain)
return super()._search(new_domain, offset, limit, order, access_rights_uid)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants