[ADD] sale_layout: Fix the rml if no note then remove the node and correct the subtotal

bzr revid: sbh@tinyerp.com-20100714065921-zq6yh2uonhlfcsz6
This commit is contained in:
sbh (Open ERP) 2010-07-14 12:29:21 +05:30
parent e2042ccda2
commit e89137252b
2 changed files with 6 additions and 5 deletions

View File

@ -68,9 +68,9 @@ class sale_order_1(report_sxw.rml_parse):
res['price_unit']="%.2f"%(entry.price_unit or 0.00)
res['discount']="%.2f"%(entry.discount and entry.discount or 0.00)
res['price_subtotal']="%.2f"%(entry.price_subtotal and entry.price_subtotal or 0.00)
sub_total[i]= entry.price_subtotal and entry.price_subtotal or 0.00
sub_total[i]= entry.price_subtotal and entry.price_subtotal
i=i+1
res['note']=entry.notes
res['note']=entry.notes or ''
res['currency']=sale_order.pricelist_id.currency_id.name
res['layout_type']=entry.layout_type
@ -81,7 +81,7 @@ class sale_order_1(report_sxw.rml_parse):
res['discount']=''
res['tax_id']=''
res['layout_type']=entry.layout_type
res['note']=entry.notes
res['note']=entry.notes or ''
res['product_uom']=''
if entry.layout_type=='subtotal':

View File

@ -315,10 +315,11 @@
<blockTable colWidths="66.0,461.0" style="Table3">
<tr>
<td>
<para style="P7"><font>[[ a['note'] and a['note']=='' and removeParentNode('blockTable') ]]</font><font>[[ repeatIn(( a['note'] and a['note'].splitlines()) or [], 'note') ]]</font></para>
<para style="P7"><font>[[ a['note']=='' and removeParentNode('blockTable') ]]</font><font>[[ repeatIn(( a['note'] and a['note'].splitlines()) or [], 'note') ]]</font></para>
</td>
<td>
<para style="P7">[[ note or removeParentNode('blockTable') ]]</para>
<para style="P7">[[ a['note'] and note or removeParentNode('blockTable') ]]</para>
</td>
</tr>
</blockTable>