[IMP]: Improve code in delivery report
bzr revid: aja@tinyerp.com-20121107060912-qyrl4zgoqnbvwbjy
This commit is contained in:
parent
a4c321e689
commit
ab92877f40
|
@ -29,11 +29,13 @@ class picking(report_sxw.rml_parse):
|
|||
super(picking, self).__init__(cr, uid, name, context=context)
|
||||
self.localcontext.update({
|
||||
'time': time,
|
||||
'get_productdesc':self.get_productdesc
|
||||
'get_product_desc':self.get_product_desc
|
||||
})
|
||||
def get_productdesc(self,code):
|
||||
code = '[' + code.product_id.default_code + ']'
|
||||
return [code]
|
||||
def get_product_desc(self,move_line):
|
||||
desc = move_line.product_id.name
|
||||
if move_line.product_id.default_code:
|
||||
desc = '[' + move_line.product_id.default_code + ']' + ' ' + desc
|
||||
return [desc]
|
||||
|
||||
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:
|
||||
|
|
|
@ -251,8 +251,8 @@
|
|||
<blockTable colWidths="256.0,74.0,58.0,60.0,73.0" style="Move_Line_Contect_Assign_State">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_2">[[ repeatIn(get_productdesc(move_lines),'desc') ]]</para>
|
||||
<para style="terp_default_9"><font face="Helvetica" size="9.0">[[ desc ]] </font><font>[[ move_lines.product_id.name ]] [[ move_lines.product_id.variants or '']] </font></para>
|
||||
<para style="terp_default_2">[[ repeatIn(get_product_desc(move_lines),'desc') ]]</para>
|
||||
<para style="terp_default_9"><font face="Helvetica" size="9.0">[[ desc ]] </font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ (move_lines.prodlot_id and move_lines.prodlot_id.name) or '' ]]</para>
|
||||
|
@ -277,7 +277,8 @@
|
|||
<blockTable colWidths="256.0,74.0,57.0,61.0,72.0" style="Table1">
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_9"><font face="Helvetica" size="9.0">[ [[ (move_lines.product_id.default_code) or removeParentNode('font') ]] ]</font> [[ move_lines.product_id.name ]] [[ move_lines.product_id.variants or '']]</para>
|
||||
<para style="terp_default_2">[[ repeatIn(get_product_desc(move_lines),'desc') ]]</para>
|
||||
<para style="terp_default_9"><font face="Helvetica" size="9.0">[[ desc ]] </font></para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_9">[[ (move_lines.prodlot_id and move_lines.prodlot_id.name) or '' ]]</para>
|
||||
|
|
Loading…
Reference in New Issue