Odoo Help

Welcome!

This community is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.

0

get all products by each location

By
Zouhair
on 7/28/14, 9:24 AM 1,001 views

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

1

Ludo - Neobis

--Ludo - Neobis--
2387
| 2 2 5
Hoogvliet, Netherlands
--Ludo - Neobis--

Developer

Ludo - Neobis
On 7/28/14, 9:31 AM

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

4

Janeesh

--Janeesh--
1641
| 4 3 4
Cochin, India
--Janeesh--

Odoo Developer

Janeesh
On 8/12/14, 6:52 AM

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

0
Zouhair
On 7/28/14, 10:10 AM

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

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.

Zouhair
on 7/29/14, 7:45 AM

Your Answer

Please try to give a substantial answer. If you wanted to comment on the question or answer, just use the commenting tool. Please remember that you can always revise your answers - no need to answer the same question twice. Also, please don't forget to vote - it really helps to select the best questions and answers!

About This Community

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

1 follower(s)

Stats

Asked: 7/28/14, 9:24 AM
Seen: 1001 times
Last updated: 3/16/15, 8:10 AM