This question has been flagged
1 Reply
4684 Views

I have several Many2one fields in a customized module in Odoo 8, they only show 160 records, when I change their type to Many2many they show all records, some of them has less than 500 records, others has less than 800 records, but all of them just provide access to 160 records, for sure there are no domains on fields.

Avatar
Discard
Best Answer

Hi @Ayham

I understand what you are saying because I deal with that some days ago. I don't know the reason for that limit but it's better that way. You could see all the elements records by making any search in the "search more" list filter and after clear the new search filter you will see all the records. I develop an js extension to make it display all the records always and all the many2one get very very slow, so I disable it. Here is the code for some one else that will be ok with the slow performance. This need to be defined in a loaded js file, there is a lot of others examples of how to load it so I just put the code here:

instance.web.DataSet.include({

name_search: function (name, domain, operator, limit) {

limit = 0;

return this._model.call('name_search', {

name: name || '',

args: domain || false,

operator: operator || 'ilike',

context: this._model.context(),

limit: limit || 0

});

},

});

Avatar
Discard
Author

@Axel Thanks dear, it's like what you said, and your code is work like a magic without effecting the performance, I don't know how to convert your answer as the right solution, or I don't have enough Karma to do that, thanks a lot.

By clicking on the buttons like on the image

Accepted & upvoted! Nice answer Axel.