This question has been flagged
1 Reply
5161 Views

I used one2many field in my module to display a tree view,
but there's no pagination for the list and the list become so long.

when I check the previous version of OpenERP(6.1) the pagination is there by default.
how to enable it in OpenERP 7 ?
Thanks..

Avatar
Discard

Hello Eddy, do you get the solution for that ? I have the same problem ..

Author

unfortunately I haven't got the solution yet, maybe it's just disabled in the widget and we just need to enable it , but I haven't know where .,

Hello , i find it : you can use this class on the one2many field .new_one2many { overflow: scroll; width:82%; }

Hi,I am also facing same issue. When i checked for new_one2many, i cannot find any class with name "new_one2many". Can you please help me to get the solution?

Best Answer

Refer this it will help all.

We can give pagination for two items/fields. One for menus and one for tabs.

For menus: just write one like code in <field name="limit">15</field> in ir.actions.act_window model. i.e.

<record id="action_program" model="ir.actions.act_window"> <field name="name">Program</field> <field name="type">ir.actions.act_window</field> <field name="res_model">lis.program</field> <field name="view_type">form</field> <field name="limit">15</field> <field name="view_mode">tree,form</field> <field name="search_view_id" ref="view_program_filter"/> <field name="view_id" ref="program_tree"/> </record>

For tab: go to

C:\Program Files (x86)\OpenERP 7.0-20140622-231040\Server\server\openerp\addons\web\static\src\js

File view_list.js Line num 117

limit: function () { if (this._limit === undefined) { this._limit = (this.options.limit || this.defaults.limit || (this.getParent().action || {}).limit || 80); } return this._limit; },

Change that default number 80 to your choice.

Avatar
Discard