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.
About This Community
Odoo Training Center
|Asked: 9/10/13, 12:04 PM|
|Seen: 3114 times|
|Last updated: 4/20/15, 2:52 PM|