'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:
</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>