diff --git a/addons/account/report/account_low_level_report.py b/addons/account/report/account_low_level_report.py index 10e5efaea7d..ddcb2022198 100644 --- a/addons/account/report/account_low_level_report.py +++ b/addons/account/report/account_low_level_report.py @@ -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 diff --git a/addons/account/report/account_low_level_report.rml b/addons/account/report/account_low_level_report.rml index 5b5599adccb..4cd0d564839 100644 --- a/addons/account/report/account_low_level_report.rml +++ b/addons/account/report/account_low_level_report.rml @@ -232,6 +232,7 @@ Accounts + [[data['form']['enable_filter'] == False or removeParentNote('blockTable')]] Name @@ -257,6 +258,26 @@ --> + + [[data['form']['enable_filter'] == True or removeParentNote('blockTable')]] + + + Name + + + Balance + + + [[data['form']['label_filter']]] + + + + [[ repeatIn(get_lines(data), 'a') ]] + [[a.get('name', '')]] + [[a.get('balance',0.0)]] + [[a.get('balance_cmp',0.0)]] + +