[IMP] account_invoice_layout: 'invoices with layout and message' report now uses decimal.precision
bzr revid: olt@tinyerp.com-20101004080240-1wwa956apwdyi6uh
This commit is contained in:
parent
ec3f4d6598
commit
11e2c3201b
|
@ -55,7 +55,7 @@ class account_invoice_with_message(report_sxw.rml_parse):
|
|||
list_in_seq[info] = info.sequence
|
||||
i = 1
|
||||
j = 0
|
||||
final=sorted(list_in_seq.items(), lambda x, y: cmp(x[1], y[1]))
|
||||
final = sorted(list_in_seq.items(), lambda x, y: cmp(x[1], y[1]))
|
||||
invoice_list = [x[0] for x in final]
|
||||
sum_flag = {}
|
||||
sum_flag[j] = -1
|
||||
|
@ -77,10 +77,10 @@ class account_invoice_with_message(report_sxw.rml_parse):
|
|||
tax_names = ','.join([tax_names_dict[x] for x in range(0, len(tax_names_dict))])
|
||||
res['tax_types'] = tax_names
|
||||
res['name'] = entry.name
|
||||
res['quantity'] = "%.2f" % (entry.quantity)
|
||||
res['price_unit'] = "%.2f" % (entry.price_unit)
|
||||
res['discount'] = "%.2f" % (entry.discount)
|
||||
res['price_subtotal'] = "%.2f" % (entry.price_subtotal)
|
||||
res['quantity'] = self.formatLang(entry.quantity, digits=self.get_digits(dp='Account'))
|
||||
res['price_unit'] = self.formatLang(entry.price_unit, digits=self.get_digits(dp='Account'))
|
||||
res['discount'] = self.formatLang(entry.discount, digits=self.get_digits(dp='Account'))
|
||||
res['price_subtotal'] = self.formatLang(entry.price_subtotal, digits=self.get_digits(dp='Account'))
|
||||
sub_total[i] = entry.price_subtotal
|
||||
i = i + 1
|
||||
res['note'] = entry.note
|
||||
|
@ -93,7 +93,6 @@ class account_invoice_with_message(report_sxw.rml_parse):
|
|||
uos_name = self.pool.get('product.uom').read(self.cr, self.uid, entry.uos_id.id, ['name'], self.context.copy())
|
||||
res['uos'] = uos_name['name']
|
||||
else:
|
||||
|
||||
res['quantity'] = ''
|
||||
res['price_unit'] = ''
|
||||
res['discount'] = ''
|
||||
|
|
|
@ -380,7 +380,7 @@
|
|||
<para style="terp_default_9">Net Total:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed) ]] [[ o.currency_id.symbol ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_untaxed, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -395,7 +395,7 @@
|
|||
<para style="terp_default_9">Taxes:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax) ]] [[ o.currency_id.symbol ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(o.amount_tax, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -410,7 +410,7 @@
|
|||
<para style="terp_default_Bold_9">Total:</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9_Bold">[[ formatLang(o.amount_total) ]] [[ o.currency_id.symbol ]]</para>
|
||||
<para style="terp_default_Right_9_Bold">[[ formatLang(o.amount_total, digits=get_digits(dp='Account')) ]] [[ o.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -449,10 +449,10 @@
|
|||
<para style="terp_default_8">[[ t.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_8">[[ formatLang(t.base) ]]</para>
|
||||
<para style="terp_default_Right_8">[[ formatLang(t.base, digits=get_digits(dp='Account')) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_8">[[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount) ]]</para>
|
||||
<para style="terp_default_Right_8">[[ (t.tax_code_id and t.tax_code_id.notprintable) and removeParentNode('blockTable') or '' ]] [[ formatLang(t.amount, digits=get_digits(dp='Account')) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_8">
|
||||
|
@ -500,4 +500,4 @@
|
|||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
</document>
|
||||
|
|
Loading…
Reference in New Issue