Skip to Content
เมนู
คุณต้องลงทะเบียนเพื่อโต้ตอบกับคอมมูนิตี้
คำถามนี้ถูกตั้งค่าสถานะ
2 ตอบกลับ
20860 มุมมอง

hello,


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?


regards

Tomasz

อวตาร
ละทิ้ง
คำตอบที่ดีที่สุด

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.

ผู้เขียน คำตอบที่ดีที่สุด

 


..and picture attached.
อวตาร
ละทิ้ง
Related Posts ตอบกลับ มุมมอง กิจกรรม
Sticky Field แก้ไขแล้ว
1
พ.ย. 19
3512
0
ม.ค. 25
1
0
ก.ค. 24
996
3
พ.ค. 16
5530
2
ธ.ค. 22
7308