Community mailing list archives

community@mail.odoo.com

stock.history total quantity and stock.quant total doesn't match

by
Aasim Ahmed Ansari
- 04/04/2016 05:16:00
Hello,

Based on my research, I feel output of the following 2 queries should be the same-
SELECT SUM(qty) FROM stock_quant WHERE product_id=%s AND location_id=%s GROUP BY product_id

SELECT SUM(quantity) FROM stock_history h WHERE h.product_id=%s AND h.location_id=%s GROUP BY h.product_id

However, for some products it is not. If I have missed anything do let me know.

I am developing comprehensive Daily Sales Report module and would like community's input in finding the best way out.

Thanks.

--

Aasim Ahmed Ansari

Cell: +91 9619 424 386