[CHG] Migration to v8
parent
9cd0c23323
commit
7c0a04744e
|
@ -202,6 +202,6 @@ wkhtmltopdf. The texts are defined inside the report classes.
|
|||
'tests/aged_trial_balance.yml'],
|
||||
# 'tests/account_move_line.yml'
|
||||
'active': False,
|
||||
'installable': False,
|
||||
'installable': True,
|
||||
'application': True,
|
||||
}
|
||||
|
|
|
@ -39,7 +39,7 @@ class AccountAccount(orm.Model):
|
|||
'Centralized',
|
||||
help="If flagged, no details will be displayed in "
|
||||
"the General Ledger report (the webkit one only), "
|
||||
"only centralized amounts per period.")
|
||||
"only centralized amounts per period."),
|
||||
}
|
||||
|
||||
_defaults = {
|
||||
|
|
|
@ -119,20 +119,22 @@ class GeneralLedgerWebkit(report_sxw.rml_parse, CommonReportHeaderWebkit):
|
|||
ledger_lines_memoizer = self._compute_account_ledger_lines(
|
||||
accounts, init_balance_memoizer, main_filter, target_move, start,
|
||||
stop)
|
||||
objects = []
|
||||
for account in self.pool.get('account.account').browse(self.cursor,
|
||||
self.uid,
|
||||
accounts):
|
||||
objects = self.pool.get('account.account').browse(self.cursor,
|
||||
self.uid,
|
||||
accounts)
|
||||
|
||||
init_balance = {}
|
||||
ledger_lines = {}
|
||||
for account in objects:
|
||||
if do_centralize and account.centralized \
|
||||
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, []))
|
||||
else:
|
||||
account.ledger_lines = ledger_lines_memoizer.get(
|
||||
ledger_lines[account.id] = ledger_lines_memoizer.get(
|
||||
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({
|
||||
'fiscalyear': fiscalyear,
|
||||
|
@ -142,6 +144,8 @@ class GeneralLedgerWebkit(report_sxw.rml_parse, CommonReportHeaderWebkit):
|
|||
'stop_period': stop_period,
|
||||
'chart_account': chart_account,
|
||||
'initial_balance_mode': initial_balance_mode,
|
||||
'init_balance': init_balance,
|
||||
'ledger_lines': ledger_lines,
|
||||
})
|
||||
|
||||
return super(GeneralLedgerWebkit, self).set_context(
|
||||
|
|
|
@ -26,7 +26,6 @@ from operator import itemgetter
|
|||
from mako.template import Template
|
||||
|
||||
|
||||
import openerp.addons
|
||||
from openerp import pooler
|
||||
from openerp.osv import osv
|
||||
from openerp.report import report_sxw
|
||||
|
@ -34,10 +33,11 @@ from openerp.tools.translate import _
|
|||
from openerp.addons.report_webkit import report_helper
|
||||
from .common_partner_reports import CommonPartnersReportHeaderWebkit
|
||||
from .webkit_parser_header_fix import HeaderFooterTextWebKitParser
|
||||
from openerp.modules.module import get_module_resource
|
||||
|
||||
|
||||
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')
|
||||
|
||||
report_helper.WebKitHelper.get_mako_template = get_mako_template
|
||||
|
|
|
@ -146,12 +146,17 @@ class PartnersLedgerWebkit(report_sxw.rml_parse,
|
|||
ledger_lines = self._compute_partner_ledger_lines(
|
||||
accounts, main_filter, target_move, start, stop,
|
||||
partner_filter=partner_ids)
|
||||
objects = []
|
||||
for account in self.pool.get('account.account').browse(self.cursor,
|
||||
self.uid,
|
||||
accounts):
|
||||
account.ledger_lines = ledger_lines.get(account.id, {})
|
||||
account.init_balance = initial_balance_lines.get(account.id, {})
|
||||
objects = self.pool.get('account.account').browse(self.cursor,
|
||||
self.uid,
|
||||
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
|
||||
# and ledger line as we may have partner with init bal
|
||||
# that are not in ledger line and vice versa
|
||||
|
@ -159,17 +164,16 @@ class PartnersLedgerWebkit(report_sxw.rml_parse,
|
|||
if initial_balance_mode:
|
||||
non_null_init_balances = dict(
|
||||
[(ib, amounts) for ib, amounts
|
||||
in account.init_balance.iteritems()
|
||||
in init_balance[account.id].iteritems()
|
||||
if amounts['init_balance']
|
||||
or amounts['init_balance_currency']])
|
||||
init_bal_lines_pids = non_null_init_balances.keys()
|
||||
else:
|
||||
account.init_balance = {}
|
||||
init_balance[account.id] = {}
|
||||
init_bal_lines_pids = []
|
||||
|
||||
account.partners_order = self._order_partners(
|
||||
partners_order[account.id] = self._order_partners(
|
||||
ledg_lines_pids, init_bal_lines_pids)
|
||||
objects.append(account)
|
||||
|
||||
self.localcontext.update({
|
||||
'fiscalyear': fiscalyear,
|
||||
|
@ -180,6 +184,9 @@ class PartnersLedgerWebkit(report_sxw.rml_parse,
|
|||
'partner_ids': partner_ids,
|
||||
'chart_account': chart_account,
|
||||
'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(
|
||||
|
|
|
@ -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 -->
|
||||
%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):
|
||||
<%
|
||||
|
@ -128,10 +128,10 @@
|
|||
<div class="act_as_tbody">
|
||||
%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">
|
||||
## date
|
||||
|
@ -153,9 +153,9 @@
|
|||
## counterpart
|
||||
<div class="act_as_cell"></div>
|
||||
## 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
|
||||
<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
|
||||
<div class="act_as_cell amount" style="padding-right: 1px;">${formatLang(cumul_balance) | amount }</div>
|
||||
%if amount_currency(data):
|
||||
|
@ -167,7 +167,7 @@
|
|||
|
||||
</div>
|
||||
%endif
|
||||
%for line in account.ledger_lines:
|
||||
%for line in ledger_lines[account.id]:
|
||||
<%
|
||||
cumul_debit += line.get('debit') or 0.0
|
||||
cumul_credit += line.get('credit') or 0.0
|
||||
|
|
|
@ -105,7 +105,7 @@
|
|||
|
||||
%for current_account in objects:
|
||||
<%
|
||||
partners_order = current_account.partners_order
|
||||
partners_order = partners_order[current_account.id]
|
||||
|
||||
# do not display accounts without partners
|
||||
if not partners_order:
|
||||
|
|
|
@ -69,9 +69,9 @@
|
|||
</div>
|
||||
|
||||
%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
|
||||
account_total_debit = 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>
|
||||
|
||||
%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_credit = 0.0
|
||||
|
@ -129,14 +129,14 @@
|
|||
</div>
|
||||
<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):
|
||||
<%
|
||||
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_curr += part_cumul_balance_curr
|
||||
|
@ -174,7 +174,7 @@
|
|||
</div>
|
||||
%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_credit += line.get('credit') or 0.0
|
||||
|
|
|
@ -110,7 +110,7 @@
|
|||
</div>
|
||||
</div>
|
||||
<div class="act_as_tbody">
|
||||
%for partner_name, p_id, p_ref, p_name in acc.partners_order:
|
||||
%for partner_name, p_id, p_ref, p_name in partners_order[acc.id]:
|
||||
%if acc.aged_lines.get(p_id):
|
||||
<div class="act_as_row lines">
|
||||
<%line = acc.aged_lines[p_id]%>
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%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_credit = 0.0
|
||||
account_balance_cumul = 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:
|
||||
20px; font-size: 12px;">${account.code} - ${account.name} -- ${partner_name or _('No Partner')} </div>
|
||||
|
||||
|
|
|
@ -1,6 +1,6 @@
|
|||
## -*- coding: utf-8 -*-
|
||||
<%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_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>
|
||||
|
||||
%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_credit = 0.0
|
||||
|
@ -67,7 +67,7 @@
|
|||
def amount(text):
|
||||
return text.replace('-', '‑') # 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_credit += line.get('credit') or 0.0
|
||||
|
|
|
@ -35,13 +35,13 @@ from functools import partial
|
|||
|
||||
|
||||
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 import addons
|
||||
from openerp import pooler
|
||||
from openerp import tools
|
||||
from openerp.addons.report_webkit import webkit_report
|
||||
from openerp.addons.report_webkit.report_helper import WebKitHelper
|
||||
from openerp.modules.module import get_module_resource
|
||||
|
||||
_logger = logging.getLogger('financial.reports.webkit')
|
||||
|
||||
|
@ -163,7 +163,7 @@ class HeaderFooterTextWebKitParser(webkit_report.WebKitParser):
|
|||
'The following diagnosis message was provided:\n') + \
|
||||
error_message
|
||||
if status:
|
||||
raise except_osv(_('Webkit error'),
|
||||
raise except_orm(_('Webkit error'),
|
||||
_("The command 'wkhtmltopdf' failed with \
|
||||
error code = %s. Message: %s") %
|
||||
(status, error_message))
|
||||
|
@ -205,19 +205,19 @@ class HeaderFooterTextWebKitParser(webkit_report.WebKitParser):
|
|||
template = False
|
||||
|
||||
if report_xml.report_file:
|
||||
path = addons.get_module_resource(
|
||||
path = get_module_resource(
|
||||
*report_xml.report_file.split(os.path.sep))
|
||||
if os.path.exists(path):
|
||||
template = file(path).read()
|
||||
if not template and report_xml.report_webkit_data:
|
||||
template = report_xml.report_webkit_data
|
||||
if not template:
|
||||
raise except_osv(
|
||||
raise except_orm(
|
||||
_('Error!'), _('Webkit Report template not found !'))
|
||||
header = report_xml.webkit_header.html
|
||||
|
||||
if not header and report_xml.header:
|
||||
raise except_osv(
|
||||
raise except_orm(
|
||||
_('No header defined for this Webkit report!'),
|
||||
_('Please set a header in company settings.')
|
||||
)
|
||||
|
@ -243,7 +243,7 @@ class HeaderFooterTextWebKitParser(webkit_report.WebKitParser):
|
|||
except Exception:
|
||||
msg = exceptions.text_error_template().render()
|
||||
_logger.error(msg)
|
||||
raise except_osv(_('Webkit render'), msg)
|
||||
raise except_orm(_('Webkit render'), msg)
|
||||
else:
|
||||
try:
|
||||
html = body_mako_tpl.render(helper=helper,
|
||||
|
@ -254,7 +254,7 @@ class HeaderFooterTextWebKitParser(webkit_report.WebKitParser):
|
|||
except Exception:
|
||||
msg = exceptions.text_error_template().render()
|
||||
_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
|
||||
# wkhtmltopdf
|
||||
|
@ -270,7 +270,7 @@ class HeaderFooterTextWebKitParser(webkit_report.WebKitParser):
|
|||
except Exception:
|
||||
msg = exceptions.text_error_template().render()
|
||||
_logger.error(msg)
|
||||
raise except_osv(_('Webkit render'), msg)
|
||||
raise except_orm(_('Webkit render'), msg)
|
||||
return (deb, 'html')
|
||||
bin = self.get_lib(cursor, uid)
|
||||
pdf = self.generate_pdf(bin, report_xml, head, foot, htmls,
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
from datetime import datetime
|
||||
ctx={}
|
||||
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')
|
||||
|
||||
-
|
||||
|
@ -17,7 +17,7 @@
|
|||
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',
|
||||
'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')
|
||||
|
||||
-
|
||||
|
@ -30,7 +30,7 @@
|
|||
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
|
||||
'amount_currency': True, 'result_selection': 'customer_supplier',
|
||||
'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')
|
||||
|
||||
-
|
||||
|
@ -43,7 +43,7 @@
|
|||
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
|
||||
'amount_currency': True, 'result_selection': 'customer_supplier',
|
||||
'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')
|
||||
|
||||
-
|
||||
|
@ -56,5 +56,5 @@
|
|||
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
|
||||
'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)}
|
||||
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')
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
ctx={}
|
||||
data_dict = {'chart_account_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')
|
||||
|
||||
-
|
||||
|
@ -15,7 +15,7 @@
|
|||
ctx={}
|
||||
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')})
|
||||
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')
|
||||
|
||||
-
|
||||
|
@ -25,7 +25,7 @@
|
|||
ctx={}
|
||||
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')})
|
||||
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')
|
||||
|
||||
-
|
||||
|
@ -35,7 +35,7 @@
|
|||
ctx={}
|
||||
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')})
|
||||
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')
|
||||
|
||||
#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),
|
||||
'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')})
|
||||
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')
|
||||
|
||||
-
|
||||
|
@ -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),
|
||||
'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')})
|
||||
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')
|
||||
# I still have to parse report content but for this I need accounting data on multiple exercises and faor all fiscal year
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
from datetime import datetime
|
||||
ctx={}
|
||||
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')
|
||||
|
||||
-
|
||||
|
@ -17,7 +17,7 @@
|
|||
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',
|
||||
'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')
|
||||
|
||||
-
|
||||
|
@ -30,7 +30,7 @@
|
|||
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
|
||||
'amount_currency': True, 'result_selection': 'customer_supplier',
|
||||
'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')
|
||||
|
||||
-
|
||||
|
@ -43,7 +43,7 @@
|
|||
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
|
||||
'amount_currency': True, 'result_selection': 'customer_supplier',
|
||||
'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')
|
||||
|
||||
-
|
||||
|
@ -56,5 +56,5 @@
|
|||
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
|
||||
'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)}
|
||||
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')
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
from datetime import datetime
|
||||
ctx={}
|
||||
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')
|
||||
|
||||
-
|
||||
|
@ -16,7 +16,7 @@
|
|||
ctx={}
|
||||
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')})
|
||||
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')
|
||||
|
||||
-
|
||||
|
@ -27,7 +27,7 @@
|
|||
ctx={}
|
||||
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')}
|
||||
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')
|
||||
|
||||
-
|
||||
|
@ -38,7 +38,7 @@
|
|||
ctx={}
|
||||
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)}
|
||||
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')
|
||||
|
||||
-
|
||||
|
@ -49,7 +49,7 @@
|
|||
ctx={}
|
||||
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')}
|
||||
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')
|
||||
|
||||
-
|
||||
|
@ -63,5 +63,5 @@
|
|||
'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)
|
||||
}
|
||||
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')
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
from datetime import datetime
|
||||
ctx={}
|
||||
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')
|
||||
|
||||
-
|
||||
|
@ -17,7 +17,7 @@
|
|||
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',
|
||||
'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')
|
||||
|
||||
-
|
||||
|
@ -30,7 +30,7 @@
|
|||
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
|
||||
'amount_currency': True, 'result_selection': 'customer_supplier',
|
||||
'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')
|
||||
|
||||
-
|
||||
|
@ -43,7 +43,7 @@
|
|||
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
|
||||
'amount_currency': True, 'result_selection': 'customer_supplier',
|
||||
'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')
|
||||
|
||||
-
|
||||
|
@ -56,5 +56,5 @@
|
|||
'until_date': '%s-12-31' %(datetime.now().year), 'target_move': 'posted',
|
||||
'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)}
|
||||
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')
|
||||
|
|
|
@ -5,7 +5,7 @@
|
|||
from datetime import datetime
|
||||
ctx={}
|
||||
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')
|
||||
|
||||
-
|
||||
|
@ -16,7 +16,7 @@
|
|||
ctx={}
|
||||
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')})
|
||||
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')
|
||||
|
||||
-
|
||||
|
@ -27,7 +27,7 @@
|
|||
ctx={}
|
||||
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')}
|
||||
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')
|
||||
|
||||
-
|
||||
|
@ -38,7 +38,7 @@
|
|||
ctx={}
|
||||
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)}
|
||||
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')
|
||||
|
||||
-
|
||||
|
@ -49,7 +49,7 @@
|
|||
ctx={}
|
||||
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')}
|
||||
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')
|
||||
|
||||
-
|
||||
|
@ -63,5 +63,5 @@
|
|||
'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)
|
||||
}
|
||||
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')
|
||||
|
|
Loading…
Reference in New Issue