coolsaint
coolsaint

Reputation: 1331

How to get current stock of a product using stock_quant and sql query by date in odoo?

I can get current stock of a product in a warehouse in current time using stock_quant table and sql query.

But how is it possible to get the current stock in a specific date using stock_quant table and sql query?

Upvotes: 0

Views: 709

Answers (1)

Mihran Thalhath
Mihran Thalhath

Reputation: 336

It is not possible to get the stock of a product at a specific date using the stock.quant table. If you need to get the stock of a product at a certain date, you can try using the qty_available field in product.product model. You can pass to_date as context while fetching the qty_available field which will get you the stock at a specific date.

Upvotes: 2

Related Questions