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

Hi ,

i would like to print all product and their warehouse

i ahve make loop and print this fields

<td width="100" align="center"> ${product.name} </td>

<td width="200" align="center"> ${product.lst_price}

</td> <td width="100" align="center"> ${product.qty_available}

</td> <td width="100" align="center"> ${product.warehouse_id.name} </td>

i have resourceful to print the name and public price and the quantity but when i try to print the warehouse print None

write none in the field cell in the table
i am using webkit tool

how can i solve this

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

There is no warehouse_id on product, is there? If you want to find out the available quantity in a certain warehouse, use the stock move objects. These will have locations and a warehouse link.

Maybe the product model has a method for this as well, you should check that one.

Ảnh đại diện
Huỷ bỏ
Bài viết liên quan Trả lời Lượt xem Hoạt động
1
thg 7 25
895
0
thg 7 24
1488
1
thg 2 23
4666
2
thg 7 19
3003
3
thg 3 15
11804