[FIX] point_of_sale: 'account_statement' report: method 'get_data' was missing
[IMP] point_of_sale: 'account_statement' report now uses decimal.precision bzr revid: olt@tinyerp.com-20101004151303-k32qnknzuczn3t95
This commit is contained in:
parent
f4927a835d
commit
ae562e1b6a
|
@ -31,10 +31,21 @@ class account_statement(report_sxw.rml_parse):
|
|||
self.localcontext.update({
|
||||
'time': time,
|
||||
'get_total':self._get_total,
|
||||
'get_data':self._get_data,
|
||||
})
|
||||
|
||||
def _get_data(self, statement):
|
||||
lines = []
|
||||
for line in statement.line_ids:
|
||||
lines.append(line)
|
||||
|
||||
return lines
|
||||
|
||||
def _get_total(self, statement_line_ids):
|
||||
total = 0.0
|
||||
for line in statement_line_ids:
|
||||
total += line.amount
|
||||
return total
|
||||
|
||||
report_sxw.report_sxw('report.account.statement', 'account.bank.statement', 'addons/statement/report/account_statement.rml', parser=account_statement,header='internal')
|
||||
|
||||
|
|
|
@ -216,10 +216,10 @@
|
|||
<para style="terp_default_Centre_8">[[ formatLang(statement.closing_date,date=True) ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(statement.balance_start) ]][[ company.currency_id.symbol ]]</para>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(statement.balance_start, digits=get_digits(dp='Account')) ]][[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(statement.balance_end_real) ]][[ company.currency_id.symbol ]]</para>
|
||||
<para style="terp_default_Centre_8">[[ formatLang(statement.balance_end_real, digits=get_digits(dp='Account')) ]][[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -247,13 +247,14 @@
|
|||
<td>
|
||||
<para style="P2">[[ repeatIn(statement.line_ids,'line_ids') and ' ' or removeParentNode('blockTable') ]]</para>
|
||||
<para style="P2">[[ repeatIn(get_data(statement), 'line_ids')]]</para>
|
||||
<para style="terp_default_9">[[ line_ids.name ]]</para>
|
||||
<!--<para style="terp_default_9">[[ line_ids.name ]]</para>-->
|
||||
<para style="terp_default_9">[[ line_ids['name'] ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_9">[[ line_ids.partner_id.name ]]</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line_ids.amount) ]][[ company.currency_id.symbol ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(line_ids.amount, digits=get_digits(dp='Account')) ]][[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -268,7 +269,7 @@
|
|||
<para style="terp_default_Right_9_Bold">Total :</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_default_Right_9">[[ formatLang(get_total(statement.line_ids)) ]][[ company.currency_id.symbol ]]</para>
|
||||
<para style="terp_default_Right_9">[[ formatLang(get_total(statement.line_ids), digits=get_digits(dp='Account')) ]][[ company.currency_id.symbol ]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
|
@ -282,4 +283,4 @@
|
|||
<font color="white"> </font>
|
||||
</para>
|
||||
</story>
|
||||
</document>
|
||||
</document>
|
||||
|
|
Loading…
Reference in New Issue