From f06fa1b6f17287117926466718a9e07869e9112d Mon Sep 17 00:00:00 2001 From: "Alexandre Fayolle @ camptocamp" Date: Wed, 12 Dec 2012 11:28:35 +0100 Subject: [PATCH] [REF] reformat list comprehension --- .../report/common_balance_reports.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/account_financial_report_webkit/report/common_balance_reports.py b/account_financial_report_webkit/report/common_balance_reports.py index 52e38a6c..7d0945a7 100644 --- a/account_financial_report_webkit/report/common_balance_reports.py +++ b/account_financial_report_webkit/report/common_balance_reports.py @@ -91,10 +91,9 @@ class CommonBalanceReportHeaderWebkit(CommonReportHeaderWebkit): # sum for top level views accounts child_ids = account_obj._get_children_and_consol(self.cursor, self.uid, account['id'], ctx) if child_ids: - child_init_balances = [ \ - init_bal['init_balance'] \ - for acnt_id, init_bal \ - in init_balance.iteritems() \ + child_init_balances = [ + init_bal['init_balance'] + for acnt_id, init_bal in init_balance.iteritems() if acnt_id in child_ids] top_init_balance = reduce(add, child_init_balances) account['init_balance'] = top_init_balance