Am Dienstag, 22. März 2016 13:46:14 UTC+1 schrieb raimonesteve:
>
> 2016-03-22 12:51 GMT+01:00 TPH <[email protected] <javascript:>>: 
> > Hello, 
> > 
> > I just wrote this question in the German group, but I think here are 
> much 
> > more people. Ill will keep both articles updated. 
> > 
> > What is the best way to get product stock directly from database? 
> > 
> > For a webshop / ebay sync I need the stock for every product of the 
> > warehouse. I have tried this with proteus, but this is not fast enough. 
> > 
> > So I am searching for an way, to get the actually stock of product on 
> the 
> > warehouse. 
> > 
> > I think I have to use  "stock_location" and "stock_move". Maybe someone 
> have 
> > already a snipped or can give me some hints. 
>
>
> https://bitbucket.org/tryton/stock/src/c9a913139d8da1cac5835362b829d16c0d28602f/product.py?fileviewer=file-view-default#product.py-135
>  
>
> It's a method very hard and spend some time depends about 
> product/stock moves in your database. 
>
> Atention with the context because return some values or others. 
>
> Raimon
>

Thank you for response. I know function. I am searching for a solution to 
get the stock directly from the Database

Maybe this is an way:
Get all locations in you warehouse
Get a Product
Filter Stock Moves to get all Moves for this Product from or into that 
locations and warehouse

-- 
You received this message because you are subscribed to the Google Groups 
"tryton" group.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/tryton/eae033c8-80b8-43a3-9e05-5fdc5bf42b6d%40googlegroups.com.

Reply via email to