[IMP] Account_voucher : YML test added for reports
bzr revid: jvo@tinyerp.com-20100917115928-dp4dly4tyu9fjzer
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user