Join GitHub today
GitHub is home to over 31 million developers working together to host and review code, manage projects, and build software together.Sign up
[FIX] never return less than LIMIT results if they exist in Model.search() #32093
Description of the issue/feature this PR addresses: In https://github.com/odoo/odoo/blob/10.0/addons/web/controllers/main.py#L865, we assume that a
Current behavior before PR: If there are duplicates when searching for an auto joined field, the UI will eventually show less results than there actually are, because the first search(...limit=) with duplicates will look to the rest of the code as if it's the last page of the result list. In my example case there should be thousands of matches, but the user only sees 78 because already the first page contains duplicates.
Desired behavior after PR is merged: We have reliable behavior with auto_join, meaning
referenced this pull request
Mar 25, 2019
this problem was in a method in the ORM. there, it indeed can be hurtful because if any override doesn't provide the keyword argument other code expects, you basically mask the new argument and everything goes to hell.