From b03c6b79302fc5e2f28e074a70cdccae5102df9e Mon Sep 17 00:00:00 2001 From: Humberto Arocha Date: Thu, 25 Jul 2013 23:06:44 +0000 Subject: [PATCH] [FIX] Totalizing lines is being fixed and now summarize only those lines which are in the account_list. --- account_financial_report/report/parser.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/account_financial_report/report/parser.py b/account_financial_report/report/parser.py index 16329078..e4d4c0c1 100644 --- a/account_financial_report/report/parser.py +++ b/account_financial_report/report/parser.py @@ -332,6 +332,7 @@ class account_balance(report_sxw.rml_parse): if 'account_list' in form and form['account_list']: account_ids = form['account_list'] + account_list= form['account_list'] del form['account_list'] credit_account_ids = self.get_company_accounts(form['company_id'] and type(form[ @@ -726,11 +727,10 @@ class account_balance(report_sxw.rml_parse): # # Check whether we must sumarize this line in the report or not # - if form['tot_check'] and res['type'] == 'view' and res['level'] == 1 and (res['id'] not in tot): - + if form['tot_check'] and (res['id'] in account_list) and (res['id'] not in tot): if form['columns'] == 'qtr': tot_check = True - #~ tot[res['id']] = True + tot[res['id']] = True tot_bal1 += res.get('bal1', 0.0) tot_bal2 += res.get('bal2', 0.0) tot_bal3 += res.get('bal3', 0.0) @@ -739,7 +739,7 @@ class account_balance(report_sxw.rml_parse): elif form['columns'] == 'thirteen': tot_check = True - #~ tot[res['id']] = True + tot[res['id']] = True tot_bal1 += res.get('bal1', 0.0) tot_bal2 += res.get('bal2', 0.0) tot_bal3 += res.get('bal3', 0.0) @@ -755,7 +755,7 @@ class account_balance(report_sxw.rml_parse): tot_bal13 += res.get('bal13', 0.0) else: tot_check = True - #~ tot[res['id']] = True + tot[res['id']] = True tot_bin += res['balanceinit'] tot_deb += res['debit'] tot_crd += res['credit']