Odoo is the world's easiest all-in-one management software. It includes hundreds of business apps:
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
This platform is for beginners and experts willing to share their Odoo knowledge. It's not a forum to discuss ideas, but a knowledge base of questions and their answers.Register
Odoo Training Center
Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.Test it now
|Asked: 12/15/14, 2:20 AM|
|Seen: 629 times|
|Last updated: 3/16/15, 8:10 AM|