Browse Source

Merge pull request #20 from acsone/8.0-account_financial_report_webkit

account_financial_report_webkit: Port to 8.0
pull/25/head
Maxime Chambreuil - http://www.savoirfairelinux.com 10 years ago
parent
commit
28c06298fb
  1. 0
      account_financial_report_webkit/__init__.py
  2. 2
      account_financial_report_webkit/__openerp__.py
  3. 2
      account_financial_report_webkit/account.py
  4. 0
      account_financial_report_webkit/account_move_line.py
  5. 0
      account_financial_report_webkit/account_view.xml
  6. 0
      account_financial_report_webkit/data/financial_webkit_header.xml
  7. 0
      account_financial_report_webkit/i18n/account_financial_report_webkit.pot
  8. 0
      account_financial_report_webkit/i18n/de.po
  9. 0
      account_financial_report_webkit/i18n/en_US.po
  10. 0
      account_financial_report_webkit/i18n/es.po
  11. 0
      account_financial_report_webkit/i18n/fr.po
  12. 0
      account_financial_report_webkit/i18n/it.po
  13. 0
      account_financial_report_webkit/i18n/nl.po
  14. 0
      account_financial_report_webkit/images/ledger.png
  15. 0
      account_financial_report_webkit/report/__init__.py
  16. 33
      account_financial_report_webkit/report/aged_partner_balance.py
  17. 58
      account_financial_report_webkit/report/common_balance_reports.py
  18. 52
      account_financial_report_webkit/report/common_partner_balance_reports.py
  19. 0
      account_financial_report_webkit/report/common_partner_reports.py
  20. 0
      account_financial_report_webkit/report/common_reports.py
  21. 20
      account_financial_report_webkit/report/general_ledger.py
  22. 31
      account_financial_report_webkit/report/open_invoices.py
  23. 0
      account_financial_report_webkit/report/partner_balance.py
  24. 25
      account_financial_report_webkit/report/partners_ledger.py
  25. 0
      account_financial_report_webkit/report/print_journal.py
  26. 0
      account_financial_report_webkit/report/report.xml
  27. 18
      account_financial_report_webkit/report/templates/account_report_general_ledger.mako
  28. 0
      account_financial_report_webkit/report/templates/account_report_open_invoices.mako
  29. 6
      account_financial_report_webkit/report/templates/account_report_partner_balance.mako
  30. 18
      account_financial_report_webkit/report/templates/account_report_partners_ledger.mako
  31. 0
      account_financial_report_webkit/report/templates/account_report_print_journal.mako
  32. 0
      account_financial_report_webkit/report/templates/account_report_profit_loss.mako
  33. 12
      account_financial_report_webkit/report/templates/account_report_trial_balance.mako
  34. 12
      account_financial_report_webkit/report/templates/aged_trial_webkit.mako
  35. 4
      account_financial_report_webkit/report/templates/grouped_by_curr_open_invoices_inclusion.mako.html
  36. 6
      account_financial_report_webkit/report/templates/open_invoices_inclusion.mako.html
  37. 0
      account_financial_report_webkit/report/trial_balance.py
  38. 18
      account_financial_report_webkit/report/webkit_parser_header_fix.py
  39. 0
      account_financial_report_webkit/report_menus.xml
  40. 0
      account_financial_report_webkit/static/src/img/icon.png
  41. 0
      account_financial_report_webkit/tests/account_move_line.yml
  42. 10
      account_financial_report_webkit/tests/aged_trial_balance.yml
  43. 12
      account_financial_report_webkit/tests/general_ledger.yml
  44. 10
      account_financial_report_webkit/tests/open_invoices.yml
  45. 12
      account_financial_report_webkit/tests/partner_balance.yml
  46. 10
      account_financial_report_webkit/tests/partner_ledger.yml
  47. 12
      account_financial_report_webkit/tests/trial_balance.yml
  48. 0
      account_financial_report_webkit/wizard/__init__.py
  49. 0
      account_financial_report_webkit/wizard/aged_partner_balance_wizard.py
  50. 0
      account_financial_report_webkit/wizard/aged_partner_balance_wizard.xml
  51. 0
      account_financial_report_webkit/wizard/balance_common.py
  52. 0
      account_financial_report_webkit/wizard/balance_common_view.xml
  53. 0
      account_financial_report_webkit/wizard/general_ledger_wizard.py
  54. 0
      account_financial_report_webkit/wizard/general_ledger_wizard_view.xml
  55. 0
      account_financial_report_webkit/wizard/open_invoices_wizard.py
  56. 0
      account_financial_report_webkit/wizard/open_invoices_wizard_view.xml
  57. 0
      account_financial_report_webkit/wizard/partner_balance_wizard.py
  58. 0
      account_financial_report_webkit/wizard/partner_balance_wizard_view.xml
  59. 0
      account_financial_report_webkit/wizard/partners_ledger_wizard.py
  60. 0
      account_financial_report_webkit/wizard/partners_ledger_wizard_view.xml
  61. 0
      account_financial_report_webkit/wizard/print_journal.py
  62. 0
      account_financial_report_webkit/wizard/print_journal_view.xml
  63. 0
      account_financial_report_webkit/wizard/trial_balance_wizard.py
  64. 0
      account_financial_report_webkit/wizard/trial_balance_wizard_view.xml
  65. 0
      account_financial_report_webkit/wizard/wizard.xml

0
__unported__/account_financial_report_webkit/__init__.py → account_financial_report_webkit/__init__.py

2
__unported__/account_financial_report_webkit/__openerp__.py → account_financial_report_webkit/__openerp__.py

@ -202,6 +202,6 @@ wkhtmltopdf. The texts are defined inside the report classes.
'tests/aged_trial_balance.yml'], 'tests/aged_trial_balance.yml'],
# 'tests/account_move_line.yml' # 'tests/account_move_line.yml'
'active': False, 'active': False,
'installable': False,
'installable': True,
'application': True, 'application': True,
} }

2
__unported__/account_financial_report_webkit/account.py → account_financial_report_webkit/account.py

@ -39,7 +39,7 @@ class AccountAccount(orm.Model):
'Centralized', 'Centralized',
help="If flagged, no details will be displayed in " help="If flagged, no details will be displayed in "
"the General Ledger report (the webkit one only), " "the General Ledger report (the webkit one only), "
"only centralized amounts per period.")
"only centralized amounts per period."),
} }
_defaults = { _defaults = {

0
__unported__/account_financial_report_webkit/account_move_line.py → account_financial_report_webkit/account_move_line.py

0
__unported__/account_financial_report_webkit/account_view.xml → account_financial_report_webkit/account_view.xml

0
__unported__/account_financial_report_webkit/data/financial_webkit_header.xml → account_financial_report_webkit/data/financial_webkit_header.xml

0
__unported__/account_financial_report_webkit/i18n/account_financial_report_webkit.pot → account_financial_report_webkit/i18n/account_financial_report_webkit.pot

0
__unported__/account_financial_report_webkit/i18n/de.po → account_financial_report_webkit/i18n/de.po

0
__unported__/account_financial_report_webkit/i18n/en_US.po → account_financial_report_webkit/i18n/en_US.po

0
__unported__/account_financial_report_webkit/i18n/es.po → account_financial_report_webkit/i18n/es.po

0
__unported__/account_financial_report_webkit/i18n/fr.po → account_financial_report_webkit/i18n/fr.po

0
__unported__/account_financial_report_webkit/i18n/it.po → account_financial_report_webkit/i18n/it.po

0
__unported__/account_financial_report_webkit/i18n/nl.po → account_financial_report_webkit/i18n/nl.po

0
__unported__/account_financial_report_webkit/images/ledger.png → account_financial_report_webkit/images/ledger.png

Before

Width: 1553  |  Height: 271  |  Size: 54 KiB

After

Width: 1553  |  Height: 271  |  Size: 54 KiB

0
__unported__/account_financial_report_webkit/report/__init__.py → account_financial_report_webkit/report/__init__.py

33
__unported__/account_financial_report_webkit/report/aged_partner_balance.py → account_financial_report_webkit/report/aged_partner_balance.py

@ -128,6 +128,7 @@ class AccountAgedTrialBalanceWebkit(PartnersOpenInvoicesWebkit):
call to set_context call to set_context
""" """
res = super(AccountAgedTrialBalanceWebkit, self).set_context( res = super(AccountAgedTrialBalanceWebkit, self).set_context(
objects, objects,
data, data,
@ -135,21 +136,35 @@ class AccountAgedTrialBalanceWebkit(PartnersOpenInvoicesWebkit):
report_type=report_type report_type=report_type
) )
agged_lines_accounts = {}
agged_totals_accounts = {}
agged_percents_accounts = {}
for acc in self.objects: for acc in self.objects:
acc.aged_lines = {}
acc.agged_totals = {}
acc.agged_percents = {}
for part_id, partner_lines in acc.ledger_lines.items():
agged_lines_accounts[acc.id] = {}
agged_totals_accounts[acc.id] = {}
agged_percents_accounts[acc.id] = {}
for part_id, partner_lines in\
self.localcontext['ledger_lines'][acc.id].items():
aged_lines = self.compute_aged_lines(part_id, aged_lines = self.compute_aged_lines(part_id,
partner_lines, partner_lines,
data) data)
if aged_lines: if aged_lines:
acc.aged_lines[part_id] = aged_lines
acc.aged_totals = totals = self.compute_totals(
acc.aged_lines.values())
acc.aged_percents = self.compute_percents(totals)
agged_lines_accounts[acc.id][part_id] = aged_lines
agged_totals_accounts[acc.id] = totals = self.compute_totals(
agged_lines_accounts[acc.id].values())
agged_percents_accounts[acc.id] = self.compute_percents(totals)
self.localcontext.update({
'agged_lines_accounts': agged_lines_accounts,
'agged_totals_accounts': agged_totals_accounts,
'agged_percents_accounts': agged_percents_accounts,
})
# Free some memory # Free some memory
del(acc.ledger_lines)
del(self.localcontext['ledger_lines'])
return res return res
def compute_aged_lines(self, partner_id, ledger_lines, data): def compute_aged_lines(self, partner_id, ledger_lines, data):

58
__unported__/account_financial_report_webkit/report/common_balance_reports.py → account_financial_report_webkit/report/common_balance_reports.py

@ -276,24 +276,34 @@ class CommonBalanceReportHeaderWebkit(CommonReportHeaderWebkit):
comparison_params.append(comp_params) comparison_params.append(comp_params)
comp_accounts_by_ids.append(comparison_result) comp_accounts_by_ids.append(comparison_result)
to_display = dict.fromkeys(account_ids, True)
objects = []
for account in self.pool.get('account.account').browse(self.cursor,
objects = self.pool.get('account.account').browse(self.cursor,
self.uid, self.uid,
account_ids):
account_ids)
to_display_accounts = dict.fromkeys(account_ids, True)
init_balance_accounts = dict.fromkeys(account_ids, False)
comparisons_accounts = dict.fromkeys(account_ids, [])
debit_accounts = dict.fromkeys(account_ids, False)
credit_accounts = dict.fromkeys(account_ids, False)
balance_accounts = dict.fromkeys(account_ids, False)
for account in objects:
if not account.parent_id: # hide top level account if not account.parent_id: # hide top level account
continue continue
if account.type == 'consolidation': if account.type == 'consolidation':
to_display.update(
to_display_accounts.update(
dict([(a.id, False) for a in account.child_consol_ids])) dict([(a.id, False) for a in account.child_consol_ids]))
elif account.type == 'view': elif account.type == 'view':
to_display.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]))
account.debit = accounts_by_ids[account.id]['debit']
account.credit = accounts_by_ids[account.id]['credit']
account.balance = accounts_by_ids[account.id]['balance']
account.init_balance = accounts_by_ids[
account.id].get('init_balance', 0.0)
debit_accounts['account_id'] = \
accounts_by_ids[account.id]['debit']
credit_accounts['account_id'] = \
accounts_by_ids[account.id]['credit']
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)
# if any amount is != 0 in comparisons, we have to display the # if any amount is != 0 in comparisons, we have to display the
# whole account # whole account
@ -308,21 +318,18 @@ class CommonBalanceReportHeaderWebkit(CommonReportHeaderWebkit):
values.get('balance', 0.0), values.get('balance', 0.0),
values.get('init_balance', 0.0))) values.get('init_balance', 0.0)))
comp_accounts.append(values) comp_accounts.append(values)
account.comparisons = comp_accounts
comparisons_accounts[account.id] = comp_accounts
# we have to display the account if a comparison as an amount or # we have to display the account if a comparison as an amount or
# if we have an amount in the main column # if we have an amount in the main column
# 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 or any((account.debit,
account.credit,
account.balance,
account.init_balance))
to_display.update(
{account.id: display_account and to_display[account.id]})
objects.append(account)
for account in objects:
account.to_display = to_display[account.id]
display_account = display_account\
or any((account.debit,
account.credit, account.balance,
init_balance_accounts[account.id]))
to_display_accounts.update(
{account.id: display_account and
to_display_accounts[account.id]})
context_report_values = { context_report_values = {
'fiscalyear': fiscalyear, 'fiscalyear': fiscalyear,
@ -336,5 +343,12 @@ class CommonBalanceReportHeaderWebkit(CommonReportHeaderWebkit):
'initial_balance': init_balance, 'initial_balance': init_balance,
'initial_balance_mode': initial_balance_mode, 'initial_balance_mode': initial_balance_mode,
'comp_params': comparison_params, 'comp_params': comparison_params,
'to_display_accounts': to_display_accounts,
'init_balance_accounts': init_balance_accounts,
'comparisons_accounts': comparisons_accounts,
'debit_accounts': debit_accounts,
'credit_accounts': credit_accounts,
'balance_accounts': balance_accounts,
} }
return objects, new_ids, context_report_values return objects, new_ids, context_report_values

52
__unported__/account_financial_report_webkit/report/common_partner_balance_reports.py → account_financial_report_webkit/report/common_partner_balance_reports.py

@ -278,19 +278,29 @@ class CommonPartnerBalanceReportHeaderWebkit(CommonBalanceReportHeaderWebkit,
partner_filter_ids=partner_ids) partner_filter_ids=partner_ids)
comparison_params.append(comp_params) comparison_params.append(comp_params)
comp_accounts_by_ids.append(comparison_result) comp_accounts_by_ids.append(comparison_result)
objects = []
for account in self.pool.get('account.account').browse(self.cursor,
objects = self.pool.get('account.account').browse(self.cursor,
self.uid, self.uid,
account_ids):
account_ids)
init_balance_accounts = {}
comparisons_accounts = {}
partners_order_accounts = {}
partners_amounts_accounts = {}
debit_accounts = {}
credit_accounts = {}
balance_accounts = {}
for account in objects:
if not account.parent_id: # hide top level account if not account.parent_id: # hide top level account
continue continue
account.debit = accounts_by_ids[account.id]['debit']
account.credit = accounts_by_ids[account.id]['credit']
account.balance = accounts_by_ids[account.id]['balance']
account.init_balance = accounts_by_ids[
debit_accounts[account.id] = accounts_by_ids[account.id]['debit']
credit_accounts[account.id] = accounts_by_ids[account.id]['credit']
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) account.id].get('init_balance', 0.0)
account.partners_amounts = partner_details_by_ids[account.id]
partners_amounts_accounts[account.id] =\
partner_details_by_ids[account.id]
comp_accounts = [] comp_accounts = []
for comp_account_by_id in comp_accounts_by_ids: for comp_account_by_id in comp_accounts_by_ids:
values = comp_account_by_id.get(account.id) values = comp_account_by_id.get(account.id)
@ -302,24 +312,25 @@ class CommonPartnerBalanceReportHeaderWebkit(CommonBalanceReportHeaderWebkit,
for partner_id, partner_values in \ for partner_id, partner_values in \
values['partners_amounts'].copy().iteritems(): values['partners_amounts'].copy().iteritems():
base_partner_balance = account.partners_amounts[
partner_id]['balance'] if \
account.partners_amounts.get(partner_id) else 0.0
base_partner_balance = partners_amounts_accounts[account.id][partner_id]['balance']\
if partners_amounts_accounts.get(account.id)\
and partners_amounts_accounts.get(account.id)\
.get(partner_id) else 0.0
partner_values.update(self._get_diff( partner_values.update(self._get_diff(
base_partner_balance, base_partner_balance,
partner_values.get('balance', 0.0))) partner_values.get('balance', 0.0)))
values['partners_amounts'][ values['partners_amounts'][
partner_id].update(partner_values) partner_id].update(partner_values)
account.comparisons = comp_accounts
comparisons_accounts[account.id] = comp_accounts
all_partner_ids = reduce(add, [comp['partners_amounts'].keys() all_partner_ids = reduce(add, [comp['partners_amounts'].keys()
for comp in comp_accounts], for comp in comp_accounts],
account.partners_amounts.keys())
account.partners_order = self._order_partners(all_partner_ids)
partners_amounts_accounts[account.id]
.keys())
objects.append(account)
partners_order_accounts[account.id] = \
self._order_partners(all_partner_ids)
context_report_values = { context_report_values = {
'fiscalyear': fiscalyear, 'fiscalyear': fiscalyear,
@ -333,6 +344,13 @@ class CommonPartnerBalanceReportHeaderWebkit(CommonBalanceReportHeaderWebkit,
'comp_params': comparison_params, 'comp_params': comparison_params,
'initial_balance_mode': initial_balance_mode, 'initial_balance_mode': initial_balance_mode,
'compute_diff': self._get_diff, 'compute_diff': self._get_diff,
'init_balance_accounts': init_balance_accounts,
'comparisons_accounts': comparisons_accounts,
'partners_order_accounts': partners_order_accounts,
'partners_amounts_accounts': partners_amounts_accounts,
'debit_accounts': debit_accounts,
'credit_accounts': credit_accounts,
'balance_accounts': balance_accounts,
} }
return objects, new_ids, context_report_values return objects, new_ids, context_report_values

0
__unported__/account_financial_report_webkit/report/common_partner_reports.py → account_financial_report_webkit/report/common_partner_reports.py

0
__unported__/account_financial_report_webkit/report/common_reports.py → account_financial_report_webkit/report/common_reports.py

20
__unported__/account_financial_report_webkit/report/general_ledger.py → account_financial_report_webkit/report/general_ledger.py

@ -119,20 +119,22 @@ class GeneralLedgerWebkit(report_sxw.rml_parse, CommonReportHeaderWebkit):
ledger_lines_memoizer = self._compute_account_ledger_lines( ledger_lines_memoizer = self._compute_account_ledger_lines(
accounts, init_balance_memoizer, main_filter, target_move, start, accounts, init_balance_memoizer, main_filter, target_move, start,
stop) stop)
objects = []
for account in self.pool.get('account.account').browse(self.cursor,
objects = self.pool.get('account.account').browse(self.cursor,
self.uid, self.uid,
accounts):
accounts)
init_balance = {}
ledger_lines = {}
for account in objects:
if do_centralize and account.centralized \ if do_centralize and account.centralized \
and ledger_lines_memoizer.get(account.id): and ledger_lines_memoizer.get(account.id):
account.ledger_lines = self._centralize_lines(
ledger_lines[account.id] = self._centralize_lines(
main_filter, ledger_lines_memoizer.get(account.id, [])) main_filter, ledger_lines_memoizer.get(account.id, []))
else: else:
account.ledger_lines = ledger_lines_memoizer.get(
ledger_lines[account.id] = ledger_lines_memoizer.get(
account.id, []) account.id, [])
account.init_balance = init_balance_memoizer.get(account.id, {})
objects.append(account)
init_balance[account.id] = init_balance_memoizer.get(account.id,
{})
self.localcontext.update({ self.localcontext.update({
'fiscalyear': fiscalyear, 'fiscalyear': fiscalyear,
@ -142,6 +144,8 @@ class GeneralLedgerWebkit(report_sxw.rml_parse, CommonReportHeaderWebkit):
'stop_period': stop_period, 'stop_period': stop_period,
'chart_account': chart_account, 'chart_account': chart_account,
'initial_balance_mode': initial_balance_mode, 'initial_balance_mode': initial_balance_mode,
'init_balance': init_balance,
'ledger_lines': ledger_lines,
}) })
return super(GeneralLedgerWebkit, self).set_context( return super(GeneralLedgerWebkit, self).set_context(

31
__unported__/account_financial_report_webkit/report/open_invoices.py → account_financial_report_webkit/report/open_invoices.py

@ -26,7 +26,6 @@ from operator import itemgetter
from mako.template import Template from mako.template import Template
import openerp.addons
from openerp import pooler from openerp import pooler
from openerp.osv import osv from openerp.osv import osv
from openerp.report import report_sxw from openerp.report import report_sxw
@ -34,10 +33,11 @@ from openerp.tools.translate import _
from openerp.addons.report_webkit import report_helper from openerp.addons.report_webkit import report_helper
from .common_partner_reports import CommonPartnersReportHeaderWebkit from .common_partner_reports import CommonPartnersReportHeaderWebkit
from .webkit_parser_header_fix import HeaderFooterTextWebKitParser from .webkit_parser_header_fix import HeaderFooterTextWebKitParser
from openerp.modules.module import get_module_resource
def get_mako_template(obj, *args): def get_mako_template(obj, *args):
template_path = openerp.addons.get_module_resource(*args)
template_path = get_module_resource(*args)
return Template(filename=template_path, input_encoding='utf-8') return Template(filename=template_path, input_encoding='utf-8')
report_helper.WebKitHelper.get_mako_template = get_mako_template report_helper.WebKitHelper.get_mako_template = get_mako_template
@ -145,29 +145,35 @@ class PartnersOpenInvoicesWebkit(report_sxw.rml_parse,
ledger_lines_memoizer = self._compute_open_transactions_lines( ledger_lines_memoizer = self._compute_open_transactions_lines(
account_ids, main_filter, target_move, start, stop, date_until, account_ids, main_filter, target_move, start, stop, date_until,
partner_filter=partner_ids) partner_filter=partner_ids)
objects = []
for account in self.pool.get('account.account').browse(self.cursor,
objects = self.pool.get('account.account').browse(self.cursor,
self.uid, self.uid,
account_ids):
account.ledger_lines = ledger_lines_memoizer.get(account.id, {})
account.init_balance = init_balance_memoizer.get(account.id, {})
account_ids)
ledger_lines = {}
init_balance = {}
partners_order = {}
for account in objects:
ledger_lines[account.id] = ledger_lines_memoizer.get(account.id,
{})
init_balance[account.id] = init_balance_memoizer.get(account.id,
{})
# we have to compute partner order based on inital balance # we have to compute partner order based on inital balance
# and ledger line as we may have partner with init bal # and ledger line as we may have partner with init bal
# that are not in ledger line and vice versa # that are not in ledger line and vice versa
ledg_lines_pids = ledger_lines_memoizer.get(account.id, {}).keys() ledg_lines_pids = ledger_lines_memoizer.get(account.id, {}).keys()
non_null_init_balances = dict([ non_null_init_balances = dict([
(ib, amounts) for ib, amounts (ib, amounts) for ib, amounts
in account.init_balance.iteritems()
in init_balance[account.id].iteritems()
if amounts['init_balance'] if amounts['init_balance']
or amounts['init_balance_currency']]) or amounts['init_balance_currency']])
init_bal_lines_pids = non_null_init_balances.keys() init_bal_lines_pids = non_null_init_balances.keys()
account.partners_order = self._order_partners(
partners_order[account.id] = self._order_partners(
ledg_lines_pids, init_bal_lines_pids) ledg_lines_pids, init_bal_lines_pids)
account.ledger_lines = ledger_lines_memoizer.get(account.id, {})
ledger_lines[account.id] = ledger_lines_memoizer.get(account.id,
{})
if group_by_currency: if group_by_currency:
self._group_lines_by_currency(account) self._group_lines_by_currency(account)
objects.append(account)
self.localcontext.update({ self.localcontext.update({
'fiscalyear': fiscalyear, 'fiscalyear': fiscalyear,
@ -178,6 +184,9 @@ class PartnersOpenInvoicesWebkit(report_sxw.rml_parse,
'date_until': date_until, 'date_until': date_until,
'partner_ids': partner_ids, 'partner_ids': partner_ids,
'chart_account': chart_account, 'chart_account': chart_account,
'ledger_lines': ledger_lines,
'init_balance': init_balance,
'partners_order': partners_order
}) })
return super(PartnersOpenInvoicesWebkit, self).set_context( return super(PartnersOpenInvoicesWebkit, self).set_context(

0
__unported__/account_financial_report_webkit/report/partner_balance.py → account_financial_report_webkit/report/partner_balance.py

25
__unported__/account_financial_report_webkit/report/partners_ledger.py → account_financial_report_webkit/report/partners_ledger.py

@ -146,12 +146,17 @@ class PartnersLedgerWebkit(report_sxw.rml_parse,
ledger_lines = self._compute_partner_ledger_lines( ledger_lines = self._compute_partner_ledger_lines(
accounts, main_filter, target_move, start, stop, accounts, main_filter, target_move, start, stop,
partner_filter=partner_ids) partner_filter=partner_ids)
objects = []
for account in self.pool.get('account.account').browse(self.cursor,
objects = self.pool.get('account.account').browse(self.cursor,
self.uid, self.uid,
accounts):
account.ledger_lines = ledger_lines.get(account.id, {})
account.init_balance = initial_balance_lines.get(account.id, {})
accounts)
init_balance = {}
ledger_lines_dict = {}
partners_order = {}
for account in objects:
ledger_lines_dict[account.id] = ledger_lines.get(account.id, {})
init_balance[account.id] = initial_balance_lines.get(account.id,
{})
# we have to compute partner order based on inital balance # we have to compute partner order based on inital balance
# and ledger line as we may have partner with init bal # and ledger line as we may have partner with init bal
# that are not in ledger line and vice versa # that are not in ledger line and vice versa
@ -159,17 +164,16 @@ class PartnersLedgerWebkit(report_sxw.rml_parse,
if initial_balance_mode: if initial_balance_mode:
non_null_init_balances = dict( non_null_init_balances = dict(
[(ib, amounts) for ib, amounts [(ib, amounts) for ib, amounts
in account.init_balance.iteritems()
in init_balance[account.id].iteritems()
if amounts['init_balance'] if amounts['init_balance']
or amounts['init_balance_currency']]) or amounts['init_balance_currency']])
init_bal_lines_pids = non_null_init_balances.keys() init_bal_lines_pids = non_null_init_balances.keys()
else: else:
account.init_balance = {}
init_balance[account.id] = {}
init_bal_lines_pids = [] init_bal_lines_pids = []
account.partners_order = self._order_partners(
partners_order[account.id] = self._order_partners(
ledg_lines_pids, init_bal_lines_pids) ledg_lines_pids, init_bal_lines_pids)
objects.append(account)
self.localcontext.update({ self.localcontext.update({
'fiscalyear': fiscalyear, 'fiscalyear': fiscalyear,
@ -180,6 +184,9 @@ class PartnersLedgerWebkit(report_sxw.rml_parse,
'partner_ids': partner_ids, 'partner_ids': partner_ids,
'chart_account': chart_account, 'chart_account': chart_account,
'initial_balance_mode': initial_balance_mode, 'initial_balance_mode': initial_balance_mode,
'init_balance': init_balance,
'ledger_lines': ledger_lines_dict,
'partners_order': partners_order
}) })
return super(PartnersLedgerWebkit, self).set_context( return super(PartnersLedgerWebkit, self).set_context(

0
__unported__/account_financial_report_webkit/report/print_journal.py → account_financial_report_webkit/report/print_journal.py

0
__unported__/account_financial_report_webkit/report/report.xml → account_financial_report_webkit/report/report.xml

18
__unported__/account_financial_report_webkit/report/templates/account_report_general_ledger.mako → account_financial_report_webkit/report/templates/account_report_general_ledger.mako

@ -75,8 +75,8 @@
<!-- we use div with css instead of table for tabular data because div do not cut rows at half at page breaks --> <!-- we use div with css instead of table for tabular data because div do not cut rows at half at page breaks -->
%for account in objects: %for account in objects:
<% <%
display_initial_balance = account.init_balance and (account.init_balance.get('debit', 0.0) != 0.0 or account.init_balance.get('credit', 0.0) != 0.0)
display_ledger_lines = account.ledger_lines
display_initial_balance = init_balance[account.id] and (init_balance[account.id].get('debit') != 0.0 or init_balance[account.id].get('credit', 0.0) != 0.0)
display_ledger_lines = ledger_lines[account.id]
%> %>
%if display_account_raw(data) == 'all' or (display_ledger_lines or display_initial_balance): %if display_account_raw(data) == 'all' or (display_ledger_lines or display_initial_balance):
<% <%
@ -128,10 +128,10 @@
<div class="act_as_tbody"> <div class="act_as_tbody">
%if display_initial_balance: %if display_initial_balance:
<% <%
cumul_debit = account.init_balance.get('debit') or 0.0
cumul_credit = account.init_balance.get('credit') or 0.0
cumul_balance = account.init_balance.get('init_balance') or 0.0
cumul_balance_curr = account.init_balance.get('init_balance_currency') or 0.0
cumul_debit = init_balance[account.id].get('debit') or 0.0
cumul_credit = init_balance[account.id].get('credit') or 0.0
cumul_balance = init_balance[account.id].get('init_balance') or 0.0
cumul_balance_curr = init_balance[account.id].get('init_balance_currency') or 0.0
%> %>
<div class="act_as_row initial_balance"> <div class="act_as_row initial_balance">
## date ## date
@ -153,9 +153,9 @@
## counterpart ## counterpart
<div class="act_as_cell"></div> <div class="act_as_cell"></div>
## debit ## debit
<div class="act_as_cell amount">${formatLang(account.init_balance.get('debit')) | amount}</div>
<div class="act_as_cell amount">${formatLang(init_balance[account.id].get('debit')) | amount}</div>
## credit ## credit
<div class="act_as_cell amount">${formatLang(account.init_balance.get('credit')) | amount}</div>
<div class="act_as_cell amount">${formatLang(init_balance[account.id].get('credit')) | amount}</div>
## balance cumulated ## balance cumulated
<div class="act_as_cell amount" style="padding-right: 1px;">${formatLang(cumul_balance) | amount }</div> <div class="act_as_cell amount" style="padding-right: 1px;">${formatLang(cumul_balance) | amount }</div>
%if amount_currency(data): %if amount_currency(data):
@ -167,7 +167,7 @@
</div> </div>
%endif %endif
%for line in account.ledger_lines:
%for line in ledger_lines[account.id]:
<% <%
cumul_debit += line.get('debit') or 0.0 cumul_debit += line.get('debit') or 0.0
cumul_credit += line.get('credit') or 0.0 cumul_credit += line.get('credit') or 0.0

0
__unported__/account_financial_report_webkit/report/templates/account_report_open_invoices.mako → account_financial_report_webkit/report/templates/account_report_open_invoices.mako

6
__unported__/account_financial_report_webkit/report/templates/account_report_partner_balance.mako → account_financial_report_webkit/report/templates/account_report_partner_balance.mako

@ -105,13 +105,13 @@
%for current_account in objects: %for current_account in objects:
<% <%
partners_order = current_account.partners_order
partners_order = partners_order_accounts[current_account.id]
# do not display accounts without partners # do not display accounts without partners
if not partners_order: if not partners_order:
continue continue
comparisons = current_account.comparisons
comparisons = comparisons_accounts[current_account.id]
# in multiple columns mode, we do not want to print accounts without any rows # in multiple columns mode, we do not want to print accounts without any rows
if comparison_mode in ('single', 'multiple'): if comparison_mode in ('single', 'multiple'):
@ -121,7 +121,7 @@
if not display_line(all_comparison_lines): if not display_line(all_comparison_lines):
continue continue
current_partner_amounts = current_account.partners_amounts
current_partner_amounts = partners_amounts_accounts[current_account.id]
total_initial_balance = 0.0 total_initial_balance = 0.0
total_debit = 0.0 total_debit = 0.0

18
__unported__/account_financial_report_webkit/report/templates/account_report_partners_ledger.mako → account_financial_report_webkit/report/templates/account_report_partners_ledger.mako

@ -69,9 +69,9 @@
</div> </div>
%for account in objects: %for account in objects:
%if account.ledger_lines or account.init_balance:
%if ledger_lines[account.id] or init_balance[account.id]:
<% <%
if not account.partners_order:
if not partners_order[account.id]:
continue continue
account_total_debit = 0.0 account_total_debit = 0.0
account_total_credit = 0.0 account_total_credit = 0.0
@ -81,7 +81,7 @@
<div class="account_title bg" style="width: 1080px; margin-top: 20px; font-size: 12px;">${account.code} - ${account.name}</div> <div class="account_title bg" style="width: 1080px; margin-top: 20px; font-size: 12px;">${account.code} - ${account.name}</div>
%for partner_name, p_id, p_ref, p_name in account.partners_order:
%for partner_name, p_id, p_ref, p_name in partners_order[account.id]:
<% <%
total_debit = 0.0 total_debit = 0.0
total_credit = 0.0 total_credit = 0.0
@ -129,14 +129,14 @@
</div> </div>
<div class="act_as_tbody"> <div class="act_as_tbody">
<% <%
total_debit = account.init_balance.get(p_id, {}).get('debit') or 0.0
total_credit = account.init_balance.get(p_id, {}).get('credit') or 0.0
total_debit = init_balance[account.id].get(p_id, {}).get('debit') or 0.0
total_credit =init_balance[account.id].get(p_id, {}).get('credit') or 0.0
%> %>
%if initial_balance_mode and (total_debit or total_credit): %if initial_balance_mode and (total_debit or total_credit):
<% <%
part_cumul_balance = account.init_balance.get(p_id, {}).get('init_balance') or 0.0
part_cumul_balance_curr = account.init_balance.get(p_id, {}).get('init_balance_currency') or 0.0
balance_forward_currency = account.init_balance.get(p_id, {}).get('currency_name') or ''
part_cumul_balance = init_balance[account.id].get(p_id, {}).get('init_balance') or 0.0
part_cumul_balance_curr = init_balance[account.id].get(p_id, {}).get('init_balance_currency') or 0.0
balance_forward_currency = init_balance[account.id].get(p_id, {}).get('currency_name') or ''
cumul_balance += part_cumul_balance cumul_balance += part_cumul_balance
cumul_balance_curr += part_cumul_balance_curr cumul_balance_curr += part_cumul_balance_curr
@ -174,7 +174,7 @@
</div> </div>
%endif %endif
%for line in account.ledger_lines.get(p_id, []):
%for line in ledger_lines[account.id].get(p_id, []):
<% <%
total_debit += line.get('debit') or 0.0 total_debit += line.get('debit') or 0.0
total_credit += line.get('credit') or 0.0 total_credit += line.get('credit') or 0.0

0
__unported__/account_financial_report_webkit/report/templates/account_report_print_journal.mako → account_financial_report_webkit/report/templates/account_report_print_journal.mako

0
__unported__/account_financial_report_webkit/report/templates/account_report_profit_loss.mako → account_financial_report_webkit/report/templates/account_report_profit_loss.mako

12
__unported__/account_financial_report_webkit/report/templates/account_report_trial_balance.mako → account_financial_report_webkit/report/templates/account_report_trial_balance.mako

@ -161,10 +161,10 @@
%> %>
%for current_account in objects: %for current_account in objects:
<% <%
if not current_account.to_display:
if not to_display_accounts[current_account.id]:
continue continue
comparisons = current_account.comparisons
comparisons = comparisons_accounts[current_account.id]
if current_account.id in last_child_consol_ids: if current_account.id in last_child_consol_ids:
# current account is a consolidation child of the last account: use the level of last account # current account is a consolidation child of the last account: use the level of last account
@ -185,15 +185,15 @@
%if comparison_mode == 'no_comparison': %if comparison_mode == 'no_comparison':
%if initial_balance_mode: %if initial_balance_mode:
## opening balance ## opening balance
<div class="act_as_cell amount">${formatLang(current_account.init_balance) | amount}</div>
<div class="act_as_cell amount">${formatLang(init_balance_accounts[current_account.id]) | amount}</div>
%endif %endif
## debit ## debit
<div class="act_as_cell amount">${formatLang(current_account.debit) | amount}</div>
<div class="act_as_cell amount">${formatLang(debit_accounts[current_account.id]) | amount}</div>
## credit ## credit
<div class="act_as_cell amount">${formatLang(current_account.credit) | amount}</div>
<div class="act_as_cell amount">${formatLang(credit_accounts[current_account.id]) | amount}</div>
%endif %endif
## balance ## balance
<div class="act_as_cell amount">${formatLang(current_account.balance) | amount}</div>
<div class="act_as_cell amount">${formatLang(balance_accounts[current_account.id]) | amount}</div>
%if comparison_mode in ('single', 'multiple'): %if comparison_mode in ('single', 'multiple'):
%for comp_account in comparisons: %for comp_account in comparisons:

12
__unported__/account_financial_report_webkit/report/templates/aged_trial_webkit.mako → account_financial_report_webkit/report/templates/aged_trial_webkit.mako

@ -89,7 +89,7 @@
</div> </div>
</div> </div>
%for acc in objects: %for acc in objects:
%if acc.aged_lines:
%if agged_lines_accounts[acc.id]:
<div class="account_title bg" style="width: 1080px; margin-top: 20px; font-size: 12px;">${acc.code} - ${acc.name}</div> <div class="account_title bg" style="width: 1080px; margin-top: 20px; font-size: 12px;">${acc.code} - ${acc.name}</div>
@ -110,12 +110,12 @@
</div> </div>
</div> </div>
<div class="act_as_tbody"> <div class="act_as_tbody">
%for partner_name, p_id, p_ref, p_name in acc.partners_order:
%if acc.aged_lines.get(p_id):
%for partner_name, p_id, p_ref, p_name in partners_order[acc.id]:
%if agged_lines_accounts[acc.id].get(p_id):
<div class="act_as_row lines"> <div class="act_as_row lines">
<%line = acc.aged_lines[p_id]%>
<%percents = acc.aged_percents%>
<%totals = acc.aged_totals%>
<%line = agged_lines_accounts[acc.id][p_id]%>
<%percents = agged_percents_accounts[acc.id]%>
<%totals = agged_totals_accounts[acc.id]%>
<div class="act_as_cell first_column">${partner_name}</div> <div class="act_as_cell first_column">${partner_name}</div>
<div class="act_as_cell">${p_ref or ''}</div> <div class="act_as_cell">${p_ref or ''}</div>

4
__unported__/account_financial_report_webkit/report/templates/grouped_by_curr_open_invoices_inclusion.mako.html → account_financial_report_webkit/report/templates/grouped_by_curr_open_invoices_inclusion.mako.html

@ -1,13 +1,13 @@
## -*- coding: utf-8 -*- ## -*- coding: utf-8 -*-
<%page args="account, formatLang" /> <%page args="account, formatLang" />
%if account.grouped_ledger_lines and account.partners_order:
%if account.grouped_ledger_lines and partners_order[account.id]:
<% <%
account_total_debit = 0.0 account_total_debit = 0.0
account_total_credit = 0.0 account_total_credit = 0.0
account_balance_cumul = 0.0 account_balance_cumul = 0.0
account_balance_cumul_curr = 0.0 account_balance_cumul_curr = 0.0
%> %>
%for partner_name, p_id, p_ref, p_name in account.partners_order:
%for partner_name, p_id, p_ref, p_name in partners_order[account.id]:
<div class="account_title bg" style="width: 1080px; margin-top: <div class="account_title bg" style="width: 1080px; margin-top:
20px; font-size: 12px;">${account.code} - ${account.name} -- ${partner_name or _('No Partner')} </div> 20px; font-size: 12px;">${account.code} - ${account.name} -- ${partner_name or _('No Partner')} </div>

6
__unported__/account_financial_report_webkit/report/templates/open_invoices_inclusion.mako.html → account_financial_report_webkit/report/templates/open_invoices_inclusion.mako.html

@ -1,6 +1,6 @@
## -*- coding: utf-8 -*- ## -*- coding: utf-8 -*-
<%page args="account, formatLang" /> <%page args="account, formatLang" />
%if account.ledger_lines and account.partners_order:
%if ledger_lines[account.id] and partners_order[account.id]:
<% <%
account_total_debit = 0.0 account_total_debit = 0.0
account_total_credit = 0.0 account_total_credit = 0.0
@ -10,7 +10,7 @@
<div class="account_title bg" style="width: 1080px; margin-top: 20px; font-size: 12px;">${account.code} - ${account.name}</div> <div class="account_title bg" style="width: 1080px; margin-top: 20px; font-size: 12px;">${account.code} - ${account.name}</div>
%for partner_name, p_id, p_ref, p_name in account.partners_order:
%for partner_name, p_id, p_ref, p_name in partners_order[account.id]:
<% <%
total_debit = 0.0 total_debit = 0.0
total_credit = 0.0 total_credit = 0.0
@ -67,7 +67,7 @@
def amount(text): def amount(text):
return text.replace('-', '&#8209;') # replace by a non-breaking hyphen (it will not word-wrap between hyphen and numbers) return text.replace('-', '&#8209;') # replace by a non-breaking hyphen (it will not word-wrap between hyphen and numbers)
%> %>
%for line in account.ledger_lines.get(p_id, []):
%for line in ledger_lines[account.id].get(p_id, []):
<% <%
total_debit += line.get('debit') or 0.0 total_debit += line.get('debit') or 0.0
total_credit += line.get('credit') or 0.0 total_credit += line.get('credit') or 0.0

0
__unported__/account_financial_report_webkit/report/trial_balance.py → account_financial_report_webkit/report/trial_balance.py

18
__unported__/account_financial_report_webkit/report/webkit_parser_header_fix.py → account_financial_report_webkit/report/webkit_parser_header_fix.py

@ -35,13 +35,13 @@ from functools import partial
from mako import exceptions from mako import exceptions
from openerp.osv.osv import except_osv
from openerp.osv.orm import except_orm
from openerp.tools.translate import _ from openerp.tools.translate import _
from openerp import addons
from openerp import pooler from openerp import pooler
from openerp import tools from openerp import tools
from openerp.addons.report_webkit import webkit_report from openerp.addons.report_webkit import webkit_report
from openerp.addons.report_webkit.report_helper import WebKitHelper from openerp.addons.report_webkit.report_helper import WebKitHelper
from openerp.modules.module import get_module_resource
_logger = logging.getLogger('financial.reports.webkit') _logger = logging.getLogger('financial.reports.webkit')
@ -163,7 +163,7 @@ class HeaderFooterTextWebKitParser(webkit_report.WebKitParser):
'The following diagnosis message was provided:\n') + \ 'The following diagnosis message was provided:\n') + \
error_message error_message
if status: if status:
raise except_osv(_('Webkit error'),
raise except_orm(_('Webkit error'),
_("The command 'wkhtmltopdf' failed with \ _("The command 'wkhtmltopdf' failed with \
error code = %s. Message: %s") % error code = %s. Message: %s") %
(status, error_message)) (status, error_message))
@ -205,19 +205,19 @@ class HeaderFooterTextWebKitParser(webkit_report.WebKitParser):
template = False template = False
if report_xml.report_file: if report_xml.report_file:
path = addons.get_module_resource(
path = get_module_resource(
*report_xml.report_file.split(os.path.sep)) *report_xml.report_file.split(os.path.sep))
if os.path.exists(path): if os.path.exists(path):
template = file(path).read() template = file(path).read()
if not template and report_xml.report_webkit_data: if not template and report_xml.report_webkit_data:
template = report_xml.report_webkit_data template = report_xml.report_webkit_data
if not template: if not template:
raise except_osv(
raise except_orm(
_('Error!'), _('Webkit Report template not found !')) _('Error!'), _('Webkit Report template not found !'))
header = report_xml.webkit_header.html header = report_xml.webkit_header.html
if not header and report_xml.header: if not header and report_xml.header:
raise except_osv(
raise except_orm(
_('No header defined for this Webkit report!'), _('No header defined for this Webkit report!'),
_('Please set a header in company settings.') _('Please set a header in company settings.')
) )
@ -243,7 +243,7 @@ class HeaderFooterTextWebKitParser(webkit_report.WebKitParser):
except Exception: except Exception:
msg = exceptions.text_error_template().render() msg = exceptions.text_error_template().render()
_logger.error(msg) _logger.error(msg)
raise except_osv(_('Webkit render'), msg)
raise except_orm(_('Webkit render'), msg)
else: else:
try: try:
html = body_mako_tpl.render(helper=helper, html = body_mako_tpl.render(helper=helper,
@ -254,7 +254,7 @@ class HeaderFooterTextWebKitParser(webkit_report.WebKitParser):
except Exception: except Exception:
msg = exceptions.text_error_template().render() msg = exceptions.text_error_template().render()
_logger.error(msg) _logger.error(msg)
raise except_osv(_('Webkit render'), msg)
raise except_orm(_('Webkit render'), msg)
# NO html footer and header because we write them as text with # NO html footer and header because we write them as text with
# wkhtmltopdf # wkhtmltopdf
@ -270,7 +270,7 @@ class HeaderFooterTextWebKitParser(webkit_report.WebKitParser):
except Exception: except Exception:
msg = exceptions.text_error_template().render() msg = exceptions.text_error_template().render()
_logger.error(msg) _logger.error(msg)
raise except_osv(_('Webkit render'), msg)
raise except_orm(_('Webkit render'), msg)
return (deb, 'html') return (deb, 'html')
bin = self.get_lib(cursor, uid) bin = self.get_lib(cursor, uid)
pdf = self.generate_pdf(bin, report_xml, head, foot, htmls, pdf = self.generate_pdf(bin, report_xml, head, foot, htmls,

0
__unported__/account_financial_report_webkit/report_menus.xml → account_financial_report_webkit/report_menus.xml

0
__unported__/account_financial_report_webkit/static/src/img/icon.png → account_financial_report_webkit/static/src/img/icon.png

Before

Width: 256  |  Height: 256  |  Size: 15 KiB

After

Width: 256  |  Height: 256  |  Size: 15 KiB

0
__unported__/account_financial_report_webkit/tests/account_move_line.yml → account_financial_report_webkit/tests/account_move_line.yml

10
__unported__/account_financial_report_webkit/tests/aged_trial_balance.yml → account_financial_report_webkit/tests/aged_trial_balance.yml

@ -5,7 +5,7 @@
from datetime import datetime from datetime import datetime
ctx={} ctx={}
data_dict = {'chart_account_id':ref('account.chart0'), 'until_date': '%s-12-31' %(datetime.now().year)} data_dict = {'chart_account_id':ref('account.chart0'), 'until_date': '%s-12-31' %(datetime.now().year)}
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_aged_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_aged_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -17,7 +17,7 @@
data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'), data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted', 'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
'amount_currency': True, 'result_selection': 'customer_supplier'} 'amount_currency': True, 'result_selection': 'customer_supplier'}
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_aged_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_aged_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -30,7 +30,7 @@
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted', 'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
'amount_currency': True, 'result_selection': 'customer_supplier', 'amount_currency': True, 'result_selection': 'customer_supplier',
'partner_ids': [ref('base.res_partner_2'), ref('base.res_partner_1')]} 'partner_ids': [ref('base.res_partner_2'), ref('base.res_partner_1')]}
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_aged_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_aged_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -43,7 +43,7 @@
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted', 'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
'amount_currency': True, 'result_selection': 'customer_supplier', 'amount_currency': True, 'result_selection': 'customer_supplier',
'filter': 'filter_period', 'period_from': ref('account.period_1'), 'period_to': ref('account.period_12')} 'filter': 'filter_period', 'period_from': ref('account.period_1'), 'period_to': ref('account.period_12')}
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_aged_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_aged_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -56,5 +56,5 @@
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted', 'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
'amount_currency': True, 'result_selection': 'customer_supplier', 'amount_currency': True, 'result_selection': 'customer_supplier',
'filter': 'filter_date', 'date_from': '%s-01-01' %(datetime.now().year), 'date_to': '%s-12-31' %(datetime.now().year)} 'filter': 'filter_date', 'date_from': '%s-01-01' %(datetime.now().year), 'date_to': '%s-12-31' %(datetime.now().year)}
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_aged_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_aged_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')

12
__unported__/account_financial_report_webkit/tests/general_ledger.yml → account_financial_report_webkit/tests/general_ledger.yml

@ -5,7 +5,7 @@
ctx={} ctx={}
data_dict = {'chart_account_id':ref('account.chart0')} data_dict = {'chart_account_id':ref('account.chart0')}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')}) ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_general_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_general_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -15,7 +15,7 @@
ctx={} ctx={}
data_dict = {'chart_account_id':ref('account.chart0'), 'target_move': 'posted'} data_dict = {'chart_account_id':ref('account.chart0'), 'target_move': 'posted'}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')}) ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_general_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_general_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -25,7 +25,7 @@
ctx={} ctx={}
data_dict = {'chart_account_id':ref('account.chart0'), 'display_account': 'bal_mix'} data_dict = {'chart_account_id':ref('account.chart0'), 'display_account': 'bal_mix'}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')}) ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_general_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_general_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -35,7 +35,7 @@
ctx={} ctx={}
data_dict = {'chart_account_id':ref('account.chart0'), 'amount_currency': 1} data_dict = {'chart_account_id':ref('account.chart0'), 'amount_currency': 1}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')}) ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_general_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_general_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
#Filter by date #Filter by date
@ -48,7 +48,7 @@
data_dict = {'chart_account_id':ref('account.chart0'),'amount_currency': 1, 'chart_account_id': 1, 'date_from': '%s-01-01' %(datetime.now().year), data_dict = {'chart_account_id':ref('account.chart0'),'amount_currency': 1, 'chart_account_id': 1, 'date_from': '%s-01-01' %(datetime.now().year),
'date_to':'%s-04-01' %(datetime.now().year), 'display_account': 'bal_all', 'filter': 'filter_date',} 'date_to':'%s-04-01' %(datetime.now().year), 'display_account': 'bal_all', 'filter': 'filter_date',}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')}) ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_general_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_general_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -60,6 +60,6 @@
data_dict = {'chart_account_id':ref('account.chart0'),'amount_currency': 1, 'chart_account_id': 1, 'date_from': '%s-01-01' %(datetime.now().year), data_dict = {'chart_account_id':ref('account.chart0'),'amount_currency': 1, 'chart_account_id': 1, 'date_from': '%s-01-01' %(datetime.now().year),
'date_to':'%s-04-01' %(datetime.now().year), 'display_account': 'bal_all', 'filter': 'filter_date',} 'date_to':'%s-04-01' %(datetime.now().year), 'display_account': 'bal_all', 'filter': 'filter_date',}
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')}) ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')})
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_general_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_general_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
# I still have to parse report content but for this I need accounting data on multiple exercises and faor all fiscal year # I still have to parse report content but for this I need accounting data on multiple exercises and faor all fiscal year

10
__unported__/account_financial_report_webkit/tests/open_invoices.yml → account_financial_report_webkit/tests/open_invoices.yml

@ -5,7 +5,7 @@
from datetime import datetime from datetime import datetime
ctx={} ctx={}
data_dict = {'chart_account_id':ref('account.chart0'), 'until_date': '%s-12-31' %(datetime.now().year)} data_dict = {'chart_account_id':ref('account.chart0'), 'until_date': '%s-12-31' %(datetime.now().year)}
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_open_invoices_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_open_invoices_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -17,7 +17,7 @@
data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'), data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted', 'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
'amount_currency': True, 'result_selection': 'customer_supplier'} 'amount_currency': True, 'result_selection': 'customer_supplier'}
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_open_invoices_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_open_invoices_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -30,7 +30,7 @@
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted', 'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
'amount_currency': True, 'result_selection': 'customer_supplier', 'amount_currency': True, 'result_selection': 'customer_supplier',
'partner_ids': [ref('base.res_partner_2'), ref('base.res_partner_1')]} 'partner_ids': [ref('base.res_partner_2'), ref('base.res_partner_1')]}
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_open_invoices_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_open_invoices_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -43,7 +43,7 @@
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted', 'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
'amount_currency': True, 'result_selection': 'customer_supplier', 'amount_currency': True, 'result_selection': 'customer_supplier',
'filter': 'filter_period', 'period_from': ref('account.period_1'), 'period_to': ref('account.period_12')} 'filter': 'filter_period', 'period_from': ref('account.period_1'), 'period_to': ref('account.period_12')}
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_open_invoices_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_open_invoices_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -56,5 +56,5 @@
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted', 'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
'amount_currency': True, 'result_selection': 'customer_supplier', 'amount_currency': True, 'result_selection': 'customer_supplier',
'filter': 'filter_date', 'date_from': '%s-01-01' %(datetime.now().year), 'date_to': '%s-12-31' %(datetime.now().year)} 'filter': 'filter_date', 'date_from': '%s-01-01' %(datetime.now().year), 'date_to': '%s-12-31' %(datetime.now().year)}
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_open_invoices_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_open_invoices_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')

12
__unported__/account_financial_report_webkit/tests/partner_balance.yml → account_financial_report_webkit/tests/partner_balance.yml

@ -5,7 +5,7 @@
from datetime import datetime from datetime import datetime
ctx={} ctx={}
data_dict = {'chart_account_id':ref('account.chart0')} data_dict = {'chart_account_id':ref('account.chart0')}
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_partner_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_partner_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -16,7 +16,7 @@
ctx={} ctx={}
data_dict = {'chart_account_id':ref('account.chart0')} data_dict = {'chart_account_id':ref('account.chart0')}
ctx.update({'model': 'account.account','active_ids':[ref('account.assets_view'), ref('account.liabilities_view')],'active_id': ref('account.assets_view')}) ctx.update({'model': 'account.account','active_ids':[ref('account.assets_view'), ref('account.liabilities_view')],'active_id': ref('account.assets_view')})
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_partner_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_partner_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -27,7 +27,7 @@
ctx={} ctx={}
data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'), data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
'filter': 'filter_period', 'period_from': ref('account.period_1'), 'period_to': ref('account.period_12')} 'filter': 'filter_period', 'period_from': ref('account.period_1'), 'period_to': ref('account.period_12')}
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_partner_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_partner_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -38,7 +38,7 @@
ctx={} ctx={}
data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'), data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
'filter': 'filter_date', 'date_from': '%s-01-01' %(datetime.now().year), 'date_to': '%s-12-31' %(datetime.now().year)} 'filter': 'filter_date', 'date_from': '%s-01-01' %(datetime.now().year), 'date_to': '%s-12-31' %(datetime.now().year)}
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_partner_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_partner_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -49,7 +49,7 @@
ctx={} ctx={}
data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'), data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
'comp0_filter': 'filter_year', 'comp0_fiscalyear_id': ref('account.data_fiscalyear')} 'comp0_filter': 'filter_year', 'comp0_fiscalyear_id': ref('account.data_fiscalyear')}
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_partner_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_partner_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -63,5 +63,5 @@
'comp1_filter': 'filter_period', 'comp1_period_from': ref('account.period_1'), 'comp1_period_to': ref('account.period_12'), 'comp1_filter': 'filter_period', 'comp1_period_from': ref('account.period_1'), 'comp1_period_to': ref('account.period_12'),
'comp2_filter': 'filter_date', 'comp2_date_from': '%s-01-01' %(datetime.now().year), 'comp2_date_to': '%s-12-31' %(datetime.now().year) 'comp2_filter': 'filter_date', 'comp2_date_from': '%s-01-01' %(datetime.now().year), 'comp2_date_to': '%s-12-31' %(datetime.now().year)
} }
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_partner_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_partner_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')

10
__unported__/account_financial_report_webkit/tests/partner_ledger.yml → account_financial_report_webkit/tests/partner_ledger.yml

@ -5,7 +5,7 @@
from datetime import datetime from datetime import datetime
ctx={} ctx={}
data_dict = {'chart_account_id':ref('account.chart0'), 'until_date': '%s-12-31' %(datetime.now().year)} data_dict = {'chart_account_id':ref('account.chart0'), 'until_date': '%s-12-31' %(datetime.now().year)}
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_partners_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_partners_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -17,7 +17,7 @@
data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'), data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted', 'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
'amount_currency': True, 'result_selection': 'customer_supplier'} 'amount_currency': True, 'result_selection': 'customer_supplier'}
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_partners_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_partners_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -30,7 +30,7 @@
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted', 'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
'amount_currency': True, 'result_selection': 'customer_supplier', 'amount_currency': True, 'result_selection': 'customer_supplier',
'partner_ids': [ref('base.res_partner_2'), ref('base.res_partner_1')]} 'partner_ids': [ref('base.res_partner_2'), ref('base.res_partner_1')]}
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_partners_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_partners_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -43,7 +43,7 @@
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted', 'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
'amount_currency': True, 'result_selection': 'customer_supplier', 'amount_currency': True, 'result_selection': 'customer_supplier',
'filter': 'filter_period', 'period_from': ref('account.period_1'), 'period_to': ref('account.period_12')} 'filter': 'filter_period', 'period_from': ref('account.period_1'), 'period_to': ref('account.period_12')}
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_partners_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_partners_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -56,5 +56,5 @@
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted', 'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
'amount_currency': True, 'result_selection': 'customer_supplier', 'amount_currency': True, 'result_selection': 'customer_supplier',
'filter': 'filter_date', 'date_from': '%s-01-01' %(datetime.now().year), 'date_to': '%s-12-31' %(datetime.now().year)} 'filter': 'filter_date', 'date_from': '%s-01-01' %(datetime.now().year), 'date_to': '%s-12-31' %(datetime.now().year)}
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_partners_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_partners_ledger_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')

12
__unported__/account_financial_report_webkit/tests/trial_balance.yml → account_financial_report_webkit/tests/trial_balance.yml

@ -5,7 +5,7 @@
from datetime import datetime from datetime import datetime
ctx={} ctx={}
data_dict = {'chart_account_id':ref('account.chart0')} data_dict = {'chart_account_id':ref('account.chart0')}
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -16,7 +16,7 @@
ctx={} ctx={}
data_dict = {'chart_account_id':ref('account.chart0')} data_dict = {'chart_account_id':ref('account.chart0')}
ctx.update({'model': 'account.account','active_ids':[ref('account.assets_view'), ref('account.liabilities_view')],'active_id': ref('account.assets_view')}) ctx.update({'model': 'account.account','active_ids':[ref('account.assets_view'), ref('account.liabilities_view')],'active_id': ref('account.assets_view')})
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -27,7 +27,7 @@
ctx={} ctx={}
data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'), data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
'filter': 'filter_period', 'period_from': ref('account.period_1'), 'period_to': ref('account.period_12')} 'filter': 'filter_period', 'period_from': ref('account.period_1'), 'period_to': ref('account.period_12')}
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -38,7 +38,7 @@
ctx={} ctx={}
data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'), data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
'filter': 'filter_date', 'date_from': '%s-01-01' %(datetime.now().year), 'date_to': '%s-12-31' %(datetime.now().year)} 'filter': 'filter_date', 'date_from': '%s-01-01' %(datetime.now().year), 'date_to': '%s-12-31' %(datetime.now().year)}
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -49,7 +49,7 @@
ctx={} ctx={}
data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'), data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
'comp0_filter': 'filter_year', 'comp0_fiscalyear_id': ref('account.data_fiscalyear')} 'comp0_filter': 'filter_year', 'comp0_fiscalyear_id': ref('account.data_fiscalyear')}
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')
- -
@ -63,5 +63,5 @@
'comp1_filter': 'filter_period', 'comp1_period_from': ref('account.period_1'), 'comp1_period_to': ref('account.period_12'), 'comp1_filter': 'filter_period', 'comp1_period_from': ref('account.period_1'), 'comp1_period_to': ref('account.period_12'),
'comp2_filter': 'filter_date', 'comp2_date_from': '%s-01-01' %(datetime.now().year), 'comp2_date_to': '%s-12-31' %(datetime.now().year) 'comp2_filter': 'filter_date', 'comp2_date_from': '%s-01-01' %(datetime.now().year), 'comp2_date_to': '%s-12-31' %(datetime.now().year)
} }
from tools import test_reports
from openerp.tools import test_reports
test_reports.try_report_action(cr, uid, 'action_account_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit') test_reports.try_report_action(cr, uid, 'action_account_trial_balance_menu_webkit',wiz_data=data_dict, context=ctx, our_module='account_financial_report_webkit')

0
__unported__/account_financial_report_webkit/wizard/__init__.py → account_financial_report_webkit/wizard/__init__.py

0
__unported__/account_financial_report_webkit/wizard/aged_partner_balance_wizard.py → account_financial_report_webkit/wizard/aged_partner_balance_wizard.py

0
__unported__/account_financial_report_webkit/wizard/aged_partner_balance_wizard.xml → account_financial_report_webkit/wizard/aged_partner_balance_wizard.xml

0
__unported__/account_financial_report_webkit/wizard/balance_common.py → account_financial_report_webkit/wizard/balance_common.py

0
__unported__/account_financial_report_webkit/wizard/balance_common_view.xml → account_financial_report_webkit/wizard/balance_common_view.xml

0
__unported__/account_financial_report_webkit/wizard/general_ledger_wizard.py → account_financial_report_webkit/wizard/general_ledger_wizard.py

0
__unported__/account_financial_report_webkit/wizard/general_ledger_wizard_view.xml → account_financial_report_webkit/wizard/general_ledger_wizard_view.xml

0
__unported__/account_financial_report_webkit/wizard/open_invoices_wizard.py → account_financial_report_webkit/wizard/open_invoices_wizard.py

0
__unported__/account_financial_report_webkit/wizard/open_invoices_wizard_view.xml → account_financial_report_webkit/wizard/open_invoices_wizard_view.xml

0
__unported__/account_financial_report_webkit/wizard/partner_balance_wizard.py → account_financial_report_webkit/wizard/partner_balance_wizard.py

0
__unported__/account_financial_report_webkit/wizard/partner_balance_wizard_view.xml → account_financial_report_webkit/wizard/partner_balance_wizard_view.xml

0
__unported__/account_financial_report_webkit/wizard/partners_ledger_wizard.py → account_financial_report_webkit/wizard/partners_ledger_wizard.py

0
__unported__/account_financial_report_webkit/wizard/partners_ledger_wizard_view.xml → account_financial_report_webkit/wizard/partners_ledger_wizard_view.xml

0
__unported__/account_financial_report_webkit/wizard/print_journal.py → account_financial_report_webkit/wizard/print_journal.py

0
__unported__/account_financial_report_webkit/wizard/print_journal_view.xml → account_financial_report_webkit/wizard/print_journal_view.xml

0
__unported__/account_financial_report_webkit/wizard/trial_balance_wizard.py → account_financial_report_webkit/wizard/trial_balance_wizard.py

0
__unported__/account_financial_report_webkit/wizard/trial_balance_wizard_view.xml → account_financial_report_webkit/wizard/trial_balance_wizard_view.xml

0
__unported__/account_financial_report_webkit/wizard/wizard.xml → account_financial_report_webkit/wizard/wizard.xml

Loading…
Cancel
Save