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...
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
|Asked: 12/15/14, 2:20 AM|
|Seen: 418 times|
|Last updated: 3/16/15, 8:10 AM|