diff --git a/addons/account_voucher/test/account_voucher.yml b/addons/account_voucher/test/account_voucher.yml index b63bfc9d129..67d26cbdbb1 100644 --- a/addons/account_voucher/test/account_voucher.yml +++ b/addons/account_voucher/test/account_voucher.yml @@ -95,3 +95,21 @@ !python {model: account.voucher}: | acc_id=self.browse(cr, uid, ref("account_voucher_voucheraxelor0")) assert(acc_id.move_id) + +- + In order to test the PDF reports defined on a account_voucher, we will print account voucher amount Report +- + !python {model: account.voucher}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.voucher.cash_amount').create(cr, uid, [ref("account_voucher_voucheraxelor0")], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_voucher-amount.'+format), 'wb+').write(data) + +- + In order to test the PDF reports defined on a account_voucher, we will print account voucher Report +- + !python {model: account.voucher}: | + import netsvc, tools, os + (data, format) = netsvc.LocalService('report.voucher.cash_receipt.drcr').create(cr, uid, [ref("account_voucher_voucheraxelor0")], {}, {}) + if tools.config['test_report_directory']: + file(os.path.join(tools.config['test_report_directory'], 'account_voucher-report.'+format), 'wb+').write(data)