Browse Source

Merge pull request #32 from acsone/8.0-afr-trial_balance_fix-sbi

[FIX] webkit: trial balance fix migration bugs
pull/35/head
Pedro M. Baeza 10 years ago
parent
commit
8a0501c16c
  1. 13
      account_financial_report_webkit/report/common_balance_reports.py
  2. 4
      account_financial_report_webkit/report/print_journal.py

13
account_financial_report_webkit/report/common_balance_reports.py

@ -94,7 +94,7 @@ class CommonBalanceReportHeaderWebkit(CommonReportHeaderWebkit):
account_ids,
['type', 'code', 'name', 'debit', 'credit',
'balance', 'parent_id', 'level', 'child_id'],
ctx)
context=ctx)
accounts_by_id = {}
for account in accounts:
@ -296,11 +296,11 @@ class CommonBalanceReportHeaderWebkit(CommonReportHeaderWebkit):
elif account.type == 'view':
to_display_accounts.update(
dict([(a.id, True) for a in account.child_id]))
debit_accounts['account_id'] = \
debit_accounts[account.id] = \
accounts_by_ids[account.id]['debit']
credit_accounts['account_id'] = \
credit_accounts[account.id] = \
accounts_by_ids[account.id]['credit']
balance_accounts['account_id'] = \
balance_accounts[account.id] = \
accounts_by_ids[account.id]['balance']
init_balance_accounts[account.id] = \
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
# want to use it in a custom report
display_account = display_account\
or any((account.debit,
account.credit, account.balance,
or any((debit_accounts[account.id],
credit_accounts[account.id],
balance_accounts[account.id],
init_balance_accounts[account.id]))
to_display_accounts.update(
{account.id: display_account and

4
account_financial_report_webkit/report/print_journal.py

@ -28,8 +28,8 @@ from openerp.tools.translate import _
from openerp import pooler
from datetime import datetime
from common_reports import CommonReportHeaderWebkit
from webkit_parser_header_fix import HeaderFooterTextWebKitParser
from .common_reports import CommonReportHeaderWebkit
from .webkit_parser_header_fix import HeaderFooterTextWebKitParser
class PrintJournalWebkit(report_sxw.rml_parse, CommonReportHeaderWebkit):

Loading…
Cancel
Save