[FIX] account_voucher: fixed error in yamls due to new constraint added in revision...
[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     journal_id: account.bank_journal
8     name: Voucher Axelor
9     narration: Basic PC
10     amount: 1000.0
11     line_ids:
12       - account_id: account.cash
13         amount: 1000.0
14         name: Voucher Axelor
15     period_id: account.period_6
16
17 -
18   In order to test the PDF reports defined on a account_voucher, we will print account voucher Report
19 -
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)