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
8 journal_id: account.bank_journal
13 - account_id: account.cash
16 period_id: account.period_6
19 In order to test the PDF reports defined on a account_voucher, we will print account voucher Report
21 !python {model: account.voucher}: |
22 import netsvc, tools, os
23 (data, format) = netsvc.LocalService('report.voucher.cash_receipt.drcr').create(cr, uid, [ref("account_voucher_voucheraxelor0")], {}, {})
24 if tools.config['test_report_directory']:
25 file(os.path.join(tools.config['test_report_directory'], 'account_voucher-report.'+format), 'wb+').write(data)