diff --git a/addons/account_budget/test/account_budget_report.yml b/addons/account_budget/test/account_budget_report.yml index 6ee1b64544e..40b0175f045 100644 --- a/addons/account_budget/test/account_budget_report.yml +++ b/addons/account_budget/test/account_budget_report.yml @@ -1,5 +1,5 @@ - - Print the Analytic Budget Report mode through wizard + Print the Analytic Budget Report through wizard - !python {model: account.analytic.account}: | import netsvc, tools, os, time @@ -9,26 +9,16 @@ from tools import test_reports test_reports.try_report_action(cr, uid, 'action_account_budget_analytic',wiz_data=data_dict, context=ctx, our_module='account_budget') -#- -# Print the Budget Report mode through wizard -#- -# !python {model: account.budget.post}: | -# import netsvc, tools, os, time -# ctx={} -# ctx.update({'model': 'account.budget.post','active_ids': [ref('account_budget.account_budget_post_sales0')]}) -# data_dict = {} -# from tools import test_reports -# test_reports.try_report_action(cr, uid, 'action_account_budget_analytic',wiz_data=data_dict, context=ctx, our_module='account_budget') - - - Print the Budget Report in Normal mode + Print the Budget Report through wizard - !python {model: account.budget.post}: | import netsvc, tools, os, time - data_dict = {'model': 'account.budget.post', 'form': {'date_from':time.strftime("%Y-01-01"),'date_to':time.strftime('%Y-%m-%d'),'id':ref('account_budget.account_budget_post_sales0'),'context':{}}} - (data, format) = netsvc.LocalService('report.account.analytic.account.budget').create(cr, uid, [ref('account_budget.account_budget_post_sales0')], data_dict, {}) - if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'account_budget-budget_report.'+format), 'wb+').write(data) + ctx={} + ctx.update({'model': 'account.budget.post','active_ids': [ref('account_budget.account_budget_post_sales0')]}) + data_dict = {} + from tools import test_reports + test_reports.try_report_action(cr, uid, 'action_account_budget_report',wiz_data=data_dict, context=ctx, our_module='account_budget') - Print the CrossOvered Budget Report mode through wizard @@ -41,13 +31,3 @@ from tools import test_reports test_reports.try_report_action(cr, uid, 'action_account_budget_crossvered_report',wiz_data=data_dict, context=ctx, our_module='account_budget') -#- -# Print the CrossOvered summary Report mode through wizard -#- -# !python {model: crossovered.budget}: | -# import netsvc, tools, os, time -# ctx={} -# ctx.update({'model': 'account.budget.post','active_ids': []}) -# data_dict = {} -# from tools import test_reports -# test_reports.try_report_action(cr, uid, 'action_account_budget_crossvered_summary_report',wiz_data=data_dict, context=ctx, our_module='account_budget') diff --git a/addons/account_invoice_layout/test/account_invoice_layout_report.yml b/addons/account_invoice_layout/test/account_invoice_layout_report.yml index cdaccf0630c..277ee73382c 100644 --- a/addons/account_invoice_layout/test/account_invoice_layout_report.yml +++ b/addons/account_invoice_layout/test/account_invoice_layout_report.yml @@ -19,12 +19,15 @@ (data, format) = netsvc.LocalService('report.account.invoice.layout').create(cr, uid, [ref('test_invoice_1')], {}, {}) if tools.config['test_report_directory']: file(os.path.join(tools.config['test_report_directory'], 'account_invoice_layout.'+format), 'wb+').write(data) + - - Print the Invoice Layout Report with Message in Normal mode + Print the Invoice Layout Report with Message through wizard - !python {model: account.invoice}: | import netsvc, tools, os, time - data_dict = {'model': 'account.invoice', 'form': {'message':ref('account_invoice_layout.demo_message1'),'id':ref('test_invoice_1'),'context':{}}} - (data, format) = netsvc.LocalService('report.notify_account.invoice').create(cr, uid, [ref('test_invoice_1')], data_dict, {}) - if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'account_invoice_layout_message_report.'+format), 'wb+').write(data) \ No newline at end of file + ctx={} + ctx.update({'model': 'account.invoice','active_ids': [ref('test_invoice_1')]}) + data_dict = {'message':ref('account_invoice_layout.demo_message1')} + from tools import test_reports + test_reports.try_report_action(cr, uid, 'action_account_invoice_special_msg',wiz_data=data_dict, context=ctx, our_module='account_invoice_layout') +