2 In order to test the PDF Partner Balance webkit wizard I will print report with default setting
4 !python {model: account.account}: |
5 from datetime import datetime
7 data_dict = {'chart_account_id':ref('account.chart0')}
8 from tools import test_reports
9 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')
12 In order to test the PDF Partner Balance webkit wizard I will print report as if we print it from an account
14 !python {model: account.account}: |
15 from datetime import datetime
17 data_dict = {'chart_account_id':ref('account.chart0')}
18 ctx.update({'model': 'account.account','active_ids':[ref('account.assets_view'), ref('account.liabilities_view')],'active_id': ref('account.assets_view')})
19 from tools import test_reports
20 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')
23 In order to test the PDF Partner Balance webkit wizard I will print report with filters on period
25 !python {model: account.account}: |
26 from datetime import datetime
28 data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
29 'filter': 'filter_period', 'period_from': ref('account.period_1'), 'period_to': ref('account.period_12')}
30 from tools import test_reports
31 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')
34 In order to test the PDF Partner Balance webkit wizard I will print report with filters on dates
36 !python {model: account.account}: |
37 from datetime import datetime
39 data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
40 'filter': 'filter_date', 'date_from': '%s-01-01' %(datetime.now().year), 'date_to': '%s-12-31' %(datetime.now().year)}
41 from tools import test_reports
42 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')
45 In order to test the PDF Partner Balance webkit wizard I will print report with one comparison filtered by year
47 !python {model: account.account}: |
48 from datetime import datetime
50 data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
51 'comp0_filter': 'filter_year', 'comp0_fiscalyear_id': ref('account.data_fiscalyear')}
52 from tools import test_reports
53 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')
56 In order to test the PDF Partner Balance webkit wizard I will print report with all comparisons filtered by year, period and date
58 !python {model: account.account}: |
59 from datetime import datetime
61 data_dict = {'chart_account_id':ref('account.chart0'), 'fiscalyear_id': ref('account.data_fiscalyear'),
62 'comp0_filter': 'filter_year', 'comp0_fiscalyear_id': ref('account.data_fiscalyear'),
63 'comp1_filter': 'filter_period', 'comp1_period_from': ref('account.period_1'), 'comp1_period_to': ref('account.period_12'),
64 'comp2_filter': 'filter_date', 'comp2_date_from': '%s-01-01' %(datetime.now().year), 'comp2_date_to': '%s-12-31' %(datetime.now().year)
66 from tools import test_reports
67 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')