[FIX] webkit: trial balance fix migration bugs
parent
4082c47723
commit
09bc991004
|
@ -94,7 +94,7 @@ class CommonBalanceReportHeaderWebkit(CommonReportHeaderWebkit):
|
||||||
account_ids,
|
account_ids,
|
||||||
['type', 'code', 'name', 'debit', 'credit',
|
['type', 'code', 'name', 'debit', 'credit',
|
||||||
'balance', 'parent_id', 'level', 'child_id'],
|
'balance', 'parent_id', 'level', 'child_id'],
|
||||||
ctx)
|
context=ctx)
|
||||||
|
|
||||||
accounts_by_id = {}
|
accounts_by_id = {}
|
||||||
for account in accounts:
|
for account in accounts:
|
||||||
|
@ -296,11 +296,11 @@ class CommonBalanceReportHeaderWebkit(CommonReportHeaderWebkit):
|
||||||
elif account.type == 'view':
|
elif account.type == 'view':
|
||||||
to_display_accounts.update(
|
to_display_accounts.update(
|
||||||
dict([(a.id, True) for a in account.child_id]))
|
dict([(a.id, True) for a in account.child_id]))
|
||||||
debit_accounts['account_id'] = \
|
debit_accounts[account.id] = \
|
||||||
accounts_by_ids[account.id]['debit']
|
accounts_by_ids[account.id]['debit']
|
||||||
credit_accounts['account_id'] = \
|
credit_accounts[account.id] = \
|
||||||
accounts_by_ids[account.id]['credit']
|
accounts_by_ids[account.id]['credit']
|
||||||
balance_accounts['account_id'] = \
|
balance_accounts[account.id] = \
|
||||||
accounts_by_ids[account.id]['balance']
|
accounts_by_ids[account.id]['balance']
|
||||||
init_balance_accounts[account.id] = \
|
init_balance_accounts[account.id] = \
|
||||||
accounts_by_ids[account.id].get('init_balance', 0.0)
|
accounts_by_ids[account.id].get('init_balance', 0.0)
|
||||||
|
@ -324,8 +324,9 @@ class CommonBalanceReportHeaderWebkit(CommonReportHeaderWebkit):
|
||||||
# we set it as a property to let the data in the report if someone
|
# we set it as a property to let the data in the report if someone
|
||||||
# want to use it in a custom report
|
# want to use it in a custom report
|
||||||
display_account = display_account\
|
display_account = display_account\
|
||||||
or any((account.debit,
|
or any((debit_accounts[account.id],
|
||||||
account.credit, account.balance,
|
credit_accounts[account.id],
|
||||||
|
balance_accounts[account.id],
|
||||||
init_balance_accounts[account.id]))
|
init_balance_accounts[account.id]))
|
||||||
to_display_accounts.update(
|
to_display_accounts.update(
|
||||||
{account.id: display_account and
|
{account.id: display_account and
|
||||||
|
|
Loading…
Reference in New Issue