Anthony Muschang
10 years ago
3 changed files with 69 additions and 1 deletions
-
1account_financial_report_webkit_xls/__openerp__.py
-
2account_financial_report_webkit_xls/report/trial_balance_xls.py
-
67account_financial_report_webkit_xls/tests/trial_balance.yml
@ -0,0 +1,67 @@ |
|||
- |
|||
In order to test the Excel Trial 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_trial_balance_menu_webkit',wiz_data=data_dict, wiz_buttons='xls_export', context=ctx, our_module='') |
|||
|
|||
- |
|||
In order to test the Excel Trial 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_trial_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 Trial 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_trial_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 Trial 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_trial_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 Trial 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_trial_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 Trial 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_trial_balance_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