Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
3 Replies
6056 Tampilan

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

Avatar
Buang
Jawaban Terbai

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

Avatar
Buang
Jawaban Terbai

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).

Avatar
Buang
Penulis Jawaban Terbai

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

Avatar
Buang
Penulis

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.

Post Terkait Replies Tampilan Aktivitas
Locations Diselesaikan
1
Mar 15
4315
8
Des 23
37446
2
Agu 21
4464
1
Apr 19
2792
6
Okt 17
12923