How to limit many2one's lookup results?

Hello !

In a form, I have a many2one filed, refering to a table with +100k rows.
For some cases, the amount of result can be more than 10 or 20k.
Especially on sao, retrieving all the results can take minutes, preventing the user to continue typing an precising his query.

Is there a way to limit the results to the first 50 of 100 first records ?

Thank you for your help.

The completion is limited to the client.limit which is 1000 by default. This should not be slow except if the rec_name computation is slow then it should be improved.

I changed sao.js / Sao.config.limit and Sao.config.display_size. The server load seems lighter.
The models are not complex to compute, but my server is really low cost (OVH/VPS SDD1).

Thank you Cedric.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.