Odoo Help


how to sum of quantity in sale order line report

on 8/22/13, 11:11 AM 3,326 views

I am creating report i need to calculate sum of all quantity in sale order line how to do that

On 8/22/13, 12:05 PM
[[ reduce(lambda x, obj: x+obj.qty , list , 0 ) ]] : Total qty of list (try "objects" as list)

source: https://doc.openerp.com/v6.1/developer/05_reports/

o.order_line would be for the list of sale order lines

product_uom_qty is the qty field in sale order lines so it would be

[[ reduce(lambda x, obj: x+obj.product_uom_qty, o.order_line, 0 ) ]]

Ohh !! Thanks its work perfectly..

Pinakin Nayi (pna)
on 8/23/13, 4:28 AM

plz be sure to mark it as correct answer ^^

on 8/23/13, 1:11 PM
Pinakin Nayi (pna)
On 8/22/13, 11:29 AM


In this case you have create function field in report py file and in that just calculate # of qty. And for field use that function in rml file.

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.


Odoo Training Center

Access to our E-learning platform and experience all Odoo Apps through learning videos, exercises and Quizz.

Test it now

Question tools

0 follower(s)


Asked: 8/22/13, 11:11 AM
Seen: 3326 times
Last updated: 3/16/15, 8:10 AM