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

hi every one,

how i can get all products by each location in postgreSQL?

i can´t find the table where odoo save the quantity of all products for each location

thanks in advance

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

To insert product no need to create stock moves. Stock Moves needs to created only if products quantity needs to be updated.

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

That is because OpenERP does not store that information directly into Postgres. It is based on a calculated field that gets updated everytime it is triggered within OpenERP. For example, when a stock move is set to the specified location.

If you want an overview outside of Postgres, just go the specified location and print out the stock report.

If you must do this within postgres then you should loop over the stock_move table and calculate based on the product_id, destination_location_id and source_location_id (or something like that).

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

thank Ludo, and is the same for inserting a products? i have to insert data into much tables?

Ảnh đại diện
Huỷ bỏ
Tác giả

Inserting products should be done using an XML-RPC connection preferably, because you will loose all sort of information when only inserting records into OpenERP. If you want to insert stock for existing products than you should be fine using the stock moves.

Bài viết liên quan Trả lời Lượt xem Hoạt động
Locations Đã xử lý
1
thg 3 15
5646
8
thg 12 23
37574
2
thg 8 21
4553
1
thg 4 19
2861
6
thg 10 17
13019