From e470276384fcd7e999dfcc1abd3f1014a915020c Mon Sep 17 00:00:00 2001 From: "Anup (OpenERP)" Date: Thu, 16 Sep 2010 21:08:14 +0530 Subject: [PATCH] [IMP] account_payment : YML test for report and demo data added bzr revid: ach@tinyerp.com-20100916153814-s4qakadpqjkvem2j --- addons/account_payment/__openerp__.py | 7 ++++-- .../account_payment/account_payment_demo.xml | 24 +++++++++++++++++++ .../test/account_payment_report.yml | 8 +++++++ 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 addons/account_payment/account_payment_demo.xml create mode 100644 addons/account_payment/test/account_payment_report.yml diff --git a/addons/account_payment/__openerp__.py b/addons/account_payment/__openerp__.py index f3e437face2..5114a576512 100644 --- a/addons/account_payment/__openerp__.py +++ b/addons/account_payment/__openerp__.py @@ -47,8 +47,11 @@ 'account_invoice_view.xml', 'account_payment_report.xml', ], - 'demo_xml': [], - 'test': ['test/account_payment.yml'], + 'demo_xml': ['account_payment_demo.xml'], + 'test': [ + 'test/account_payment.yml' + 'test/account_payment_report.yml' + ], 'installable': True, 'active': False, 'certificate': '0061703998541', diff --git a/addons/account_payment/account_payment_demo.xml b/addons/account_payment/account_payment_demo.xml new file mode 100644 index 00000000000..25fe4a2c55b --- /dev/null +++ b/addons/account_payment/account_payment_demo.xml @@ -0,0 +1,24 @@ + + + + + Reserve Bank + 00987654321 + + + + + Direct Payment + + + + + + ORDER1 + + + now + draft + + + diff --git a/addons/account_payment/test/account_payment_report.yml b/addons/account_payment/test/account_payment_report.yml new file mode 100644 index 00000000000..45022e19a73 --- /dev/null +++ b/addons/account_payment/test/account_payment_report.yml @@ -0,0 +1,8 @@ +- + In order to test the PDF reports defined on Account Payment, Print a Payment Order +- + !python {model: payment.order}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.payment.order').create(cr, uid, [ref('account_payment.payment_order_1')], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_payment-payment_order_report.'+format), 'wb+').write(data) \ No newline at end of file