Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

1

Many2one field issue

By
Ayham
on 3/5/16, 10:53 AM 650 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.

2

Axel Mendoza

--Axel Mendoza--
10205
| 7 7 8
Camaguey, Cuba
--Axel Mendoza--

DevOps - Full stack - Software Architect - Developer - Technology Integrator

I could help you to develop anything and solve complex problems based on technologies, integrations and tricky stuffs mostly in Python with OpenERP/Odoo, Zato, Django and many others frameworks programming languages and technologies.

I offers consulting services to anyone with an unanswered questions or needs for customizations. Think about it, maybe it's better to have an expert to solve your issues and projects than having a full time employee trying to understand what to do an how

Reach me at aekroft@gmail.com

Axel Mendoza
On 3/5/16, 7:01 PM

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

});

},

});

@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.

Ayham
on 3/6/16, 10:53 AM

By clicking on the buttons like on the image

Axel Mendoza
on 3/6/16, 11:01 AM

Accepted & upvoted! Nice answer Axel.

Yenthe
on 3/7/16, 5:01 AM

Thanks!!

Axel Mendoza
on 3/7/16, 1:54 PM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

2 follower(s)

Stats

Asked: 3/5/16, 10:53 AM
Seen: 650 times
Last updated: 3/7/16, 5:01 AM