Is it possible in some way ?
I want to limit the number of displayed rows to 2, enabing pagination if more, because I have a form where 90% there will be no more and many of them to display.
Thanks in advance
Odoo is the world's easiest all-in-one management software.
It includes hundreds of business apps:
Is it possible in some way ?
I want to limit the number of displayed rows to 2, enabing pagination if more, because I have a form where 90% there will be no more and many of them to display.
Thanks in advance
Hii Alessandro Fiorino,
In Odoo, the optional="show" parameter is used to define whether a field in a tree (list) view is visible by default but can be hidden by the user through customization of the view (by clicking the small gear icon on the right side of the tree view).
Using this code you can manage rows.
This is useful when you want some fields to be shown by default but give the user the flexibility to hide them if they don't need to see them all the time. Fields that are defined with optional="show" will be visible by default, but the user can choose to hide them by customizing the view.
Thanks,
but it is for limiting the columns displayed, I would like to limit how many rows.
Odoo does not provide this type of functionality, that's why we need to manage via optional parameter. This parameter is very useful. just add in you one2many tree view.
I used limit=2 but it doens't work, it continues to show at least 4 rows.
Hi, you can apply `limit=number` on the tree view XML side. You can refer to the code example below.
tree limit="10"
Create an account today to enjoy exclusive features and engage with our awesome community!
Sign up