[IMP] account: added comparison logic to low level report
bzr revid: qdp-launchpad@openerp.com-20110825004535-6lfhbsal2dygpqb0
This commit is contained in:
parent
a8787f6170
commit
0885fdb9e6
|
@ -101,6 +101,8 @@ class report_account_common(report_sxw.rml_parse, common_report_header):
|
|||
'balance': report.balance,
|
||||
'type': 'report',
|
||||
}
|
||||
if data['form']['enable_filter']:
|
||||
vals['balance_cmp'] = self.pool.get('account.low.level.report').browse(self.cr, self.uid, report.id, context=data['form']['comparison_context']).balance
|
||||
lines.append(vals)
|
||||
if report.type == 'accounts' and report.display_detail:
|
||||
for account in report.account_ids:
|
||||
|
@ -109,6 +111,8 @@ class report_account_common(report_sxw.rml_parse, common_report_header):
|
|||
'balance': account.balance,
|
||||
'type': 'account',
|
||||
}
|
||||
if data['form']['enable_filter']:
|
||||
vals['balance_cmp'] = self.pool.get('account.account').browse(self.cr, self.uid, account.id, context=data['form']['comparison_context']).balance
|
||||
lines.append(vals)
|
||||
return lines
|
||||
|
||||
|
|
|
@ -232,6 +232,7 @@
|
|||
</para>
|
||||
<para style="terp_header">Accounts</para>
|
||||
<blockTable colWidths="263.0,100.0" style="Table_Account_Line_Title">
|
||||
[[data['form']['enable_filter'] == False or removeParentNote('blockTable')]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Name</para>
|
||||
|
@ -257,6 +258,26 @@
|
|||
-->
|
||||
</tr>
|
||||
</blockTable>
|
||||
<blockTable colWidths="263.0,100.0,100" style="Table_Account_Line_Title">
|
||||
[[data['form']['enable_filter'] == True or removeParentNote('blockTable')]]
|
||||
<tr>
|
||||
<td>
|
||||
<para style="terp_default_Bold_9">Name</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">Balance</para>
|
||||
</td>
|
||||
<td>
|
||||
<para style="terp_tblheader_Details_Right">[[data['form']['label_filter']]]</para>
|
||||
</td>
|
||||
</tr>
|
||||
<tr style="Table3">
|
||||
[[ repeatIn(get_lines(data), 'a') ]]
|
||||
<td>[[a.get('name', '')]]</td>
|
||||
<td>[[a.get('balance',0.0)]]</td>
|
||||
<td>[[a.get('balance_cmp',0.0)]]</td>
|
||||
</tr>
|
||||
</blockTable>
|
||||
<para style="Standard">
|
||||
<font color="white"> </font>
|
||||
</para>
|
||||
|
|
Loading…
Reference in New Issue