CRM | e-Commerce | Accounting | Inventory | PoS | Project management | MRP | etc.
I am trying to get the sum() saled quantity of a product. For that i write the below query.
"""select sum(product_uom_qty) from sale_order_line where product_id=%d and state=%s"""
Ther is more than ten sales orders which are there in done state.
product_id is the browse record of product. But it's return None. Can any one tell me how can i get sum of saled quantity of product.
hmm... maybe you should try something like...
res = cr.fetchall()
in your case out is only a querry, but you didn't fetch any data ...
also.. check this answer
basicaly.. the same explanation...
About This Community
Odoo Training Center
|Asked: 12/15/14, 2:20 AM|
|Seen: 528 times|
|Last updated: 3/16/15, 8:10 AM|