Odoo Help


sorting on field - how to set it up?

Tomasz Serwanski
on 5/16/17, 7:23 AM 1,018 views


In stock module, I have 'inventory control' -> 'products'; when switched to list view I can see list as on pisture attached. Problem I have is that I can sort the list using for example 'product type' column (marked green), but cannot sort using 'quantity on hand' nor 'forecasted quantity'. View name used for the list is 'product.template.product.tree'; column 'quantity on hand' and 'forecasted quantity' are inherited from other, 'product.template.stock.tree.inherit'.

How to make fields marked in red on picture, labeled as:

<field name="qty_available"/>

<field name="virtual_available"/>

to be sortable?



Esther Martín
On 5/19/17, 11:26 AM

That fields are compute fields. By default, they are not stored at database, so you cant sort products by that fields.

You can set them store="True" and thats make it possible to sort on qty on hand of forecast

Indeed, and yet, the more computed fields are in tree view, the more it takes to be fully charged. You should use them wisely.

on 10/5/17, 11:17 AM
Tomasz Serwanski
On 5/16/17, 7:24 AM


..and picture attached.

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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

2 follower(s)


Asked: 5/16/17, 7:23 AM
Seen: 1018 times
Last updated: 5/19/17, 11:26 AM