2 Demo for Account Voucher
4 !record {model: account.voucher, id: account_voucher_voucheraxelor0}:
5 account_id: account.cash
6 company_id: base.main_company
7 journal_id: account.bank_journal
12 - account_id: account.cash
15 period_id: account.period_6
18 In order to test the PDF reports defined on a account_voucher, we will print account voucher Report
20 !python {model: account.voucher}: |
21 import netsvc, tools, os
22 (data, format) = netsvc.LocalService('report.voucher.cash_receipt.drcr').create(cr, uid, [ref("account_voucher_voucheraxelor0")], {}, {})
23 if tools.config['test_report_directory']:
24 file(os.path.join(tools.config['test_report_directory'], 'account_voucher-report.'+format), 'wb+').write(data)