diff --git a/addons/account_reporting/__openerp__.py b/addons/account_reporting/__openerp__.py index 5ac93d17984..fb05e755ac2 100644 --- a/addons/account_reporting/__openerp__.py +++ b/addons/account_reporting/__openerp__.py @@ -36,7 +36,8 @@ 'account_data.xml', 'wizard/account_reporting_balance_report_view.xml', ], - 'demo_xml': [], + 'demo_xml': ['account_reporting_demo.xml'], + 'test': ['test/account_reporting_report.yml'], 'installable': True, 'active': False, 'certificate': '0072305016797', diff --git a/addons/account_reporting/account_reporting_demo.xml b/addons/account_reporting/account_reporting_demo.xml new file mode 100644 index 00000000000..880fa51deda --- /dev/null +++ b/addons/account_reporting/account_reporting_demo.xml @@ -0,0 +1,9 @@ + + + + + My Balance Sheet + MBS + + + \ No newline at end of file diff --git a/addons/account_reporting/test/account_reporting_report.yml b/addons/account_reporting/test/account_reporting_report.yml new file mode 100644 index 00000000000..9754f53cc4d --- /dev/null +++ b/addons/account_reporting/test/account_reporting_report.yml @@ -0,0 +1,9 @@ +- + Print the Balance Sheet Report in Normal mode +- + !python {model: account.report.bs }: | + import netsvc, tools, os, time + data_dict = {'model': 'account.report.bs', 'form': {'fiscalyear':ref('account.data_fiscalyear'),'periods':[ref('account.period_1'),ref('account.period_2'),ref('account.period_3')],'context':{}}} + (data, format) = netsvc.LocalService('report.account.report.bs').create(cr, uid, [ref('account_reporting.account_balance_sheet_1')], data_dict, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_reporting-balance_sheet_report.'+format), 'wb+').write(data) \ No newline at end of file