Browse Source

[REF] reformat list comprehension

pull/7/merge
Alexandre Fayolle @ camptocamp 12 years ago
parent
commit
f06fa1b6f1
  1. 7
      account_financial_report_webkit/report/common_balance_reports.py

7
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

Loading…
Cancel
Save