Odoo Help

Welcome!

This community 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.

0

how to sum of quantity in sale order line report

By
gpkarthick
on 8/22/13, 11:11 AM 2,520 views

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

1

Felipe

--Felipe--
962
| 5 3 8
Bogotá, Colombia
--Felipe--
Informatics engineer Industrial engineer
Felipe
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 ^^

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

Hi,

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.

Your Answer

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

This community is for professionals and enthusiasts of our products and services. Read Guidelines

Question tools

0 follower(s)

Stats

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