[IMP]:stock:Packing List
authorapa-tiny <apa@tinyerp.com>
Wed, 10 Nov 2010 10:33:57 +0000 (16:03 +0530)
committerapa-tiny <apa@tinyerp.com>
Wed, 10 Nov 2010 10:33:57 +0000 (16:03 +0530)
bzr revid: apa@tinyerp.com-20101110103357-t579do98v7bbcj2f

addons/stock/report/picking.py
addons/stock/report/picking.rml

index b517eef..27141c9 100644 (file)
@@ -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:
index 2b8c6e0..0df9138 100644 (file)
         </tr>
       </blockTable>
     </section>
-    <blockTable colWidths="388.0,55.0,77.0" style="Table2">
+    <blockTable colWidths="388.0,56.0,77.0" style="Table2">
       <tr>
         <td>
           <para style="terp_default_9">
           <para style="terp_tblheader_Details_Centre">Total</para>
         </td>
         <td>
-          <para style="terp_tblheader_Details_Right">[[ formatLang(get_qtytotal(picking.move_lines), digits=get_digits(dp='Product UoM')) ]]</para>
+          <para style="terp_tblheader_Details_Right">[[ formatLang(get_qtytotal(picking.move_lines)['quantity'], digits=get_digits(dp='Product UoM')) ]] [[ get_qtytotal(picking.move_lines)['uom'] ]]</para>
         </td>
       </tr>
     </blockTable>