From 4d9d04ee75e5204e1bb04bdd852564c21536fa88 Mon Sep 17 00:00:00 2001 From: apa-tiny Date: Wed, 10 Nov 2010 13:54:04 +0530 Subject: [PATCH] [IMP]:stock:Packing List Report. * pdf title should be "packing list" * invert the quantity and location columns * add a total row as last line that sums the quantity bzr revid: apa@tinyerp.com-20101110082404-qmio81f8y1yvgls3 --- addons/stock/report/picking.py | 6 ++++ addons/stock/report/picking.rml | 52 +++++++++++++++++++++++---------- addons/stock/stock_report.xml | 2 +- 3 files changed, 44 insertions(+), 16 deletions(-) diff --git a/addons/stock/report/picking.py b/addons/stock/report/picking.py index 29a53fba7a2..b517eef36b5 100644 --- a/addons/stock/report/picking.py +++ b/addons/stock/report/picking.py @@ -29,7 +29,13 @@ class picking(report_sxw.rml_parse): super(picking, self).__init__(cr, uid, name, context=context) self.localcontext.update({ 'time': time, + 'get_qtytotal':self._get_qtytotal }) + def _get_qtytotal(self,move_lines): + total=0.0 + for move in move_lines: + total+=move.product_qty + return total 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 6c6027093a0..2b8c6e06587 100644 --- a/addons/stock/report/picking.rml +++ b/addons/stock/report/picking.rml @@ -1,6 +1,6 @@ - -