X-Git-Url: http://git.cyclocoop.org/?a=blobdiff_plain;f=tests%2Fpartner_balance.yml;fp=tests%2Fpartner_balance.yml;h=37613104a0d122c34926377508888d3dd97f7593;hb=cddef38e342c880228694525c45df3f7dd8c2148;hp=0000000000000000000000000000000000000000;hpb=bffd331c220385010fe9abad9e228fc2004a293a;p=burette%2Faccount_financial_report_webkit.git diff --git a/tests/partner_balance.yml b/tests/partner_balance.yml new file mode 100644 index 0000000..3761310 --- /dev/null +++ b/tests/partner_balance.yml @@ -0,0 +1,67 @@ +- + In order to test the PDF Partner Balance webkit wizard I will print report with default setting +- + !python {model: account.account}: | + from datetime import datetime + ctx={} + data_dict = {'chart_account_id':ref('account.chart0')} + from 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') + +- + In order to test the PDF 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={} + 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 + 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') + +- + In order to test the PDF Partner Balance webkit wizard I will print report with filters on period +- + !python {model: account.account}: | + from datetime import datetime + 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 + 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') + +- + In order to test the PDF Partner Balance webkit wizard I will print report with filters on dates +- + !python {model: account.account}: | + from datetime import datetime + 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 + 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') + +- + In order to test the PDF Partner Balance webkit wizard I will print report with one comparison filtered by year +- + !python {model: account.account}: | + from datetime import datetime + 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 + 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') + +- + In order to test the PDF 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={} + 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 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')