Anthony Muschang
10 years ago
8 changed files with 266 additions and 7 deletions
-
6account_financial_report_webkit_xls/__openerp__.py
-
2account_financial_report_webkit_xls/report/general_ledger_xls.py
-
4account_financial_report_webkit_xls/report/partner_ledger_xls.py
-
9account_financial_report_webkit_xls/report/partners_balance_xls.py
-
65account_financial_report_webkit_xls/tests/general_ledger.yml
-
60account_financial_report_webkit_xls/tests/open_invoices.yml
-
67account_financial_report_webkit_xls/tests/partner_balance.yml
-
60account_financial_report_webkit_xls/tests/partner_ledger.yml
@ -0,0 +1,65 @@ |
|||
- |
|||
In order to test the Excel General Ledger webkit wizard I will print report with default setting |
|||
- |
|||
!python {model: account.account}: | |
|||
ctx={'xls_export':1} |
|||
data_dict = {'chart_account_id':ref('account.chart0')} |
|||
ctx.update({'model': 'account.account','active_ids':[ref('account.chart0')],'active_id':ref('account.chart0')}) |
|||
from openerp.tools import test_reports |
|||
test_reports.try_report_action(cr, uid, 'account_financial_report_webkit.action_account_general_ledger_menu_webkit',wiz_data=data_dict, context=ctx, wiz_buttons='xls_export',our_module='account_financial_report_webkit_xls') |
|||
|
|||
- |
|||
In order to test the Excel General Ledger webkit wizard I will print report with posted move |
|||
- |
|||
!python {model: account.account}: | |
|||
ctx={'xls_export':1} |
|||
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 openerp.tools import test_reports |
|||
test_reports.try_report_action(cr, uid, 'account_financial_report_webkit.action_account_general_ledger_menu_webkit',wiz_data=data_dict, context=ctx, wiz_buttons='xls_export',our_module='account_financial_report_webkit_xls') |
|||
|
|||
- |
|||
In order to test the Excel General Ledger webkit wizard I will print report with transactions or non zero balance |
|||
- |
|||
!python {model: account.account}: | |
|||
ctx={'xls_export':1} |
|||
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 openerp.tools import test_reports |
|||
test_reports.try_report_action(cr, uid, 'account_financial_report_webkit.action_account_general_ledger_menu_webkit',wiz_data=data_dict, context=ctx, wiz_buttons='xls_export',our_module='account_financial_report_webkit_xls') |
|||
|
|||
- |
|||
In order to test the Excel General Ledger webkit wizard I will print report with inital balance and currency ammount |
|||
- |
|||
!python {model: account.account}: | |
|||
ctx={'xls_export':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')}) |
|||
from openerp.tools import test_reports |
|||
test_reports.try_report_action(cr, uid, 'account_financial_report_webkit.action_account_general_ledger_menu_webkit',wiz_data=data_dict, context=ctx, wiz_buttons='xls_export',our_module='account_financial_report_webkit_xls') |
|||
|
|||
#Filter by date |
|||
- |
|||
In order to test the Excel General Ledger webkit wizard I will print report with inital balance and currency ammount and I filter by date of the first tree month |
|||
- |
|||
!python {model: account.account}: | |
|||
from datetime import datetime |
|||
ctx={'xls_export':1} |
|||
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 openerp.tools import test_reports |
|||
test_reports.try_report_action(cr, uid, 'account_financial_report_webkit.action_account_general_ledger_menu_webkit',wiz_data=data_dict, context=ctx, wiz_buttons='xls_export',our_module='account_financial_report_webkit_xls') |
|||
|
|||
- |
|||
In order to test the Excel General Ledger webkit wizard I will print report with inital balance and currency ammount and I filter by date of the first tree month |
|||
- |
|||
!python {model: account.account}: | |
|||
from datetime import datetime |
|||
ctx={'xls_export':1} |
|||
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 openerp.tools import test_reports |
|||
test_reports.try_report_action(cr, uid, 'account_financial_report_webkit.action_account_general_ledger_menu_webkit',wiz_data=data_dict, context=ctx, wiz_buttons='xls_export',our_module='account_financial_report_webkit_xls') |
|||
# I still have to parse report content but for this I need accounting data on multiple exercises and faor all fiscal year |
@ -0,0 +1,60 @@ |
|||
- |
|||
In order to test the Excel Open Invoices Report webkit wizard I will print report with default setting |
|||
- |
|||
!python {model: account.account}: | |
|||
from datetime import datetime |
|||
ctx={'xls_export':1} |
|||
data_dict = {'chart_account_id':ref('account.chart0'), 'until_date': '%s-12-31' %(datetime.now().year)} |
|||
from openerp.tools import test_reports |
|||
test_reports.try_report_action(cr, uid, 'account_financial_report_webkit.action_account_open_invoices_menu_webkit',wiz_data=data_dict, context=ctx, wiz_buttons='xls_export',our_module='account_financial_report_webkit_xls') |
|||
|
|||
- |
|||
In order to test the Excel Open Invoices Report webkit wizard I will print report with filters and currency |
|||
- |
|||
!python {model: account.account}: | |
|||
from datetime import datetime |
|||
ctx={'xls_export':1} |
|||
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 openerp.tools import test_reports |
|||
test_reports.try_report_action(cr, uid, 'account_financial_report_webkit.action_account_open_invoices_menu_webkit',wiz_data=data_dict, context=ctx, wiz_buttons='xls_export',our_module='account_financial_report_webkit_xls') |
|||
|
|||
- |
|||
In order to test the Excel Open Invoices Report webkit wizard I will print report with filters on partners |
|||
- |
|||
!python {model: account.account}: | |
|||
from datetime import datetime |
|||
ctx={'xls_export':1} |
|||
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', |
|||
'partner_ids': [ref('base.res_partner_2'), ref('base.res_partner_1')]} |
|||
from openerp.tools import test_reports |
|||
test_reports.try_report_action(cr, uid, 'account_financial_report_webkit.action_account_open_invoices_menu_webkit',wiz_data=data_dict, context=ctx, wiz_buttons='xls_export',our_module='account_financial_report_webkit_xls') |
|||
|
|||
- |
|||
In order to test the Excel Open Invoices Report webkit wizard I will print report with filters on periods |
|||
- |
|||
!python {model: account.account}: | |
|||
from datetime import datetime |
|||
ctx={'xls_export':1} |
|||
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', |
|||
'filter': 'filter_period', 'period_from': ref('account.period_1'), 'period_to': ref('account.period_12')} |
|||
from openerp.tools import test_reports |
|||
test_reports.try_report_action(cr, uid, 'account_financial_report_webkit.action_account_open_invoices_menu_webkit',wiz_data=data_dict, context=ctx, wiz_buttons='xls_export',our_module='account_financial_report_webkit_xls') |
|||
|
|||
- |
|||
In order to test the Excel Open Invoices Report webkit wizard I will print report with filters on dates |
|||
- |
|||
!python {model: account.account}: | |
|||
from datetime import datetime |
|||
ctx={'xls_export':1} |
|||
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', |
|||
'filter': 'filter_date', 'date_from': '%s-01-01' %(datetime.now().year), 'date_to': '%s-12-31' %(datetime.now().year)} |
|||
from openerp.tools import test_reports |
|||
test_reports.try_report_action(cr, uid, 'account_financial_report_webkit.action_account_open_invoices_menu_webkit',wiz_data=data_dict, context=ctx, wiz_buttons='xls_export',our_module='account_financial_report_webkit_xls') |
@ -0,0 +1,67 @@ |
|||
- |
|||
In order to test the Excel Partner Balance webkit wizard I will print report with default setting |
|||
- |
|||
!python {model: account.account}: | |
|||
from datetime import datetime |
|||
ctx={'xls_export':1} |
|||
data_dict = {'chart_account_id':ref('account.chart0')} |
|||
from openerp.tools import test_reports |
|||
test_reports.try_report_action(cr, uid, 'account_financial_report_webkit.action_account_partner_balance_menu_webkit',wiz_data=data_dict, context=ctx, wiz_buttons='xls_export', our_module='account_financial_report_webkit_xls') |
|||
|
|||
- |
|||
In order to test the Excel Partner Balance webkit wizard I will print report as if we print it from an account |
|||
- |
|||
!python {model: account.account}: | |
|||
from datetime import datetime |
|||
ctx={'xls_export':1} |
|||
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 openerp.tools import test_reports |
|||
test_reports.try_report_action(cr, uid, 'account_financial_report_webkit.action_account_partner_balance_menu_webkit',wiz_data=data_dict, context=ctx, wiz_buttons='xls_export', our_module='account_financial_report_webkit_xls') |
|||
|
|||
- |
|||
In order to test the Excel Partner Balance webkit wizard I will print report with filters on period |
|||
- |
|||
!python {model: account.account}: | |
|||
from datetime import datetime |
|||
ctx={'xls_export':1} |
|||
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 openerp.tools import test_reports |
|||
test_reports.try_report_action(cr, uid, 'account_financial_report_webkit.action_account_partner_balance_menu_webkit',wiz_data=data_dict, context=ctx, wiz_buttons='xls_export', our_module='account_financial_report_webkit_xls') |
|||
|
|||
- |
|||
In order to test the Excel Partner Balance webkit wizard I will print report with filters on dates |
|||
- |
|||
!python {model: account.account}: | |
|||
from datetime import datetime |
|||
ctx={'xls_export':1} |
|||
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 openerp.tools import test_reports |
|||
test_reports.try_report_action(cr, uid, 'account_financial_report_webkit.action_account_partner_balance_menu_webkit',wiz_data=data_dict, context=ctx, wiz_buttons='xls_export', our_module='account_financial_report_webkit_xls') |
|||
|
|||
- |
|||
In order to test the Excel Partner Balance webkit wizard I will print report with one comparison filtered by year |
|||
- |
|||
!python {model: account.account}: | |
|||
from datetime import datetime |
|||
ctx={'xls_export':1} |
|||
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 openerp.tools import test_reports |
|||
test_reports.try_report_action(cr, uid, 'account_financial_report_webkit.action_account_partner_balance_menu_webkit',wiz_data=data_dict, context=ctx, wiz_buttons='xls_export', our_module='account_financial_report_webkit_xls') |
|||
|
|||
- |
|||
In order to test the Excel Partner Balance webkit wizard I will print report with all comparisons filtered by year, period and date |
|||
- |
|||
!python {model: account.account}: | |
|||
from datetime import datetime |
|||
ctx={'xls_export':1} |
|||
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'), |
|||
'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 openerp.tools import test_reports |
|||
test_reports.try_report_action(cr, uid, 'account_financial_report_webkit.action_account_partner_balance_menu_webkit',wiz_data=data_dict, context=ctx, wiz_buttons='xls_export',our_module='account_financial_report_webkit_xls') |
@ -0,0 +1,60 @@ |
|||
- |
|||
In order to test the Excel Partner Ledger webkit wizard I will print report with default setting |
|||
- |
|||
!python {model: account.account}: | |
|||
from datetime import datetime |
|||
ctx={'xls_export':1} |
|||
data_dict = {'chart_account_id':ref('account.chart0'), 'until_date': '%s-12-31' %(datetime.now().year)} |
|||
from openerp.tools import test_reports |
|||
test_reports.try_report_action(cr, uid, 'account_financial_report_webkit.action_account_partners_ledger_menu_webkit',wiz_data=data_dict, context=ctx, wiz_buttons='xls_export',our_module='account_financial_report_webkit_xls') |
|||
|
|||
- |
|||
In order to test the Excel Partner Ledger webkit wizard I will print report with filters and currency |
|||
- |
|||
!python {model: account.account}: | |
|||
from datetime import datetime |
|||
ctx={'xls_export':1} |
|||
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 openerp.tools import test_reports |
|||
test_reports.try_report_action(cr, uid, 'account_financial_report_webkit.action_account_partners_ledger_menu_webkit',wiz_data=data_dict, context=ctx, wiz_buttons='xls_export',our_module='account_financial_report_webkit_xls') |
|||
|
|||
- |
|||
In order to test the Excel Partner Ledger webkit wizard I will print report with filters on partners |
|||
- |
|||
!python {model: account.account}: | |
|||
from datetime import datetime |
|||
ctx={'xls_export':1} |
|||
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', |
|||
'partner_ids': [ref('base.res_partner_2'), ref('base.res_partner_1')]} |
|||
from openerp.tools import test_reports |
|||
test_reports.try_report_action(cr, uid, 'account_financial_report_webkit.action_account_partners_ledger_menu_webkit',wiz_data=data_dict, context=ctx, wiz_buttons='xls_export',our_module='account_financial_report_webkit_xls') |
|||
|
|||
- |
|||
In order to test the Excel Partner Ledger webkit wizard I will print report with filters on periods |
|||
- |
|||
!python {model: account.account}: | |
|||
from datetime import datetime |
|||
ctx={'xls_export':1} |
|||
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', |
|||
'filter': 'filter_period', 'period_from': ref('account.period_1'), 'period_to': ref('account.period_12')} |
|||
from openerp.tools import test_reports |
|||
test_reports.try_report_action(cr, uid, 'account_financial_report_webkit.action_account_partners_ledger_menu_webkit',wiz_data=data_dict, context=ctx, wiz_buttons='xls_export',our_module='account_financial_report_webkit_xls') |
|||
|
|||
- |
|||
In order to test the Excel Partner Ledger webkit wizard I will print report with filters on dates |
|||
- |
|||
!python {model: account.account}: | |
|||
from datetime import datetime |
|||
ctx={'xls_export':1} |
|||
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', |
|||
'filter': 'filter_date', 'date_from': '%s-01-01' %(datetime.now().year), 'date_to': '%s-12-31' %(datetime.now().year)} |
|||
from openerp.tools import test_reports |
|||
test_reports.try_report_action(cr, uid, 'account_financial_report_webkit.action_account_partners_ledger_menu_webkit',wiz_data=data_dict, context=ctx, wiz_buttons='xls_export',our_module='account_financial_report_webkit_xls') |
Write
Preview
Loading…
Cancel
Save
Reference in new issue