[IMP] Changed all module categories, limited number of categories
[odoo/odoo.git] / addons / account_voucher / test / account_voucher_report.yml
1 -
2   Demo for Account Voucher
3 -
4   !record {model: account.voucher, id: account_voucher_voucheraxelor0}:
5     account_id: account.cash
6     company_id: base.main_company
7     currency_id: base.EUR
8     journal_id: account.bank_journal
9     name: Voucher Axelor
10     narration: Basic PC
11     amount: 1000.0
12     line_ids:
13       - account_id: account.cash
14         amount: 1000.0
15         name: Voucher Axelor
16     period_id: account.period_6
17
18 -
19   In order to test the PDF reports defined on a account_voucher, we will print account voucher Report
20 -
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)