Bỏ qua để đến Nội dung
Menu
Câu hỏi này đã bị gắn cờ
2 Trả lời
20858 Lượt xem

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

Ảnh đại diện
Huỷ bỏ
Câu trả lời hay nhất

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

Ảnh đại diện
Huỷ bỏ

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

Tác giả Câu trả lời hay nhất

 


..and picture attached.
Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
Sticky Field Đã xử lý
1
thg 11 19
3511
0
thg 1 25
1
0
thg 7 24
991
3
thg 5 16
5528
2
thg 12 22
7307