Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
In openerp 7 Form view many2one field box if entered value "a" default search 7 records. How to increase limit upto 25 records. I overridden name and name_search method to increase the limit to 25. After that in search view many2one field limit increased successfully but in the form view only shows 7 record. How to increase in many2one field search records in form view?
In the web module look for the file 'view_form.js'
web > static > src > js > view_form.js
search for this line: 'instance.web.form.CompletionFieldMixin' ( its on line 2898 for me )
below that line is an init function. Change this.limit = 7; to this.limit = 25;
this.limit = this.name == 'stage_id' ? 25 : 7;
the 'stage_id' is the name of the stage field for the crm_leads table. In this case it would show 25 records if the stage_id dropdown list is clicked, otherwise it sets the limit to the default 7 records for the other many2one fields. Feel free to modify it however you need
RIght here there is a module that does what you want:
poi_limit_search adds a field on General Settings where you have to change the value and a many2one field is going to have that limit of values.
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 platform 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.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 9/10/13, 12:04 PM|
|Seen: 2330 times|
|Last updated: 4/20/15, 2:52 PM|