From c27a83738934ecae4a94113d8e37e6bda4e59ce5 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Wed, 10 Nov 2010 16:03:57 +0530 Subject: [PATCH] [IMP]:stock:Packing List bzr revid: apa@tinyerp.com-20101110103357-t579do98v7bbcj2f --- addons/stock/report/picking.py | 5 +++-- addons/stock/report/picking.rml | 4 ++-- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/addons/stock/report/picking.py b/addons/stock/report/picking.py index b517eef..27141c9 100644 --- a/addons/stock/report/picking.py +++ b/addons/stock/report/picking.py @@ -32,10 +32,11 @@ class picking(report_sxw.rml_parse): 'get_qtytotal':self._get_qtytotal }) def _get_qtytotal(self,move_lines): - total=0.0 + total = 0.0 + uom = move_lines[0].product_uom.name for move in move_lines: total+=move.product_qty - return total + return {'quantity':total,'uom':uom} report_sxw.report_sxw('report.stock.picking.list','stock.picking','addons/stock/report/picking.rml',parser=picking) # vim:expandtab:smartindent:tabstop=4:softtabstop=4:shiftwidth=4: diff --git a/addons/stock/report/picking.rml b/addons/stock/report/picking.rml index 2b8c6e0..0df9138 100644 --- a/addons/stock/report/picking.rml +++ b/addons/stock/report/picking.rml @@ -267,7 +267,7 @@ - + @@ -278,7 +278,7 @@ Total - [[ formatLang(get_qtytotal(picking.move_lines), digits=get_digits(dp='Product UoM')) ]] + [[ formatLang(get_qtytotal(picking.move_lines)['quantity'], digits=get_digits(dp='Product UoM')) ]] [[ get_qtytotal(picking.move_lines)['uom'] ]] -- 1.7.10.4