This question has been flagged
1 Reply
5887 Views

Hello,

Is there a way to change the default number of elements per page in a One2many tree field? Particularly the stock moves in a picking, because for each move I validate, the page reloads back to the first page and the default max rows display.

Modifying the respective tree action/view does nothing - most of them are set to 80 rows, however every one2many field tree seems to be set to 40.

Thanks!

EDIT: Nevermind, I figured it out. In case it's useful for anyone: In the respective form view I have to add the limit attribute to the tree element in the XML:

<tree [...] limit="100">
    <field ....>
</tree>

change 100 for whichever number you need.

Avatar
Discard
Best Answer

Did u by chance came the strange behaviour of Updating qty in the same Picking..

For Example: lets us assume there are 100 lines (stock.move)

Now -- Update first 50 lines & save the picking record..

After some time, if you try updating remaining lines of the same picking, System doesn't seem to accept the value, feels strange, and guessing this could be a bug in Odoo. 

Let me know if you faced the same issue.

Avatar
Discard
Author

To be honest it was a client and not me who needed to change the pagination. Apparently they haven't crossed with this problem in particular, otherwise they would've reported it. But I'll let you know if something happens!