858f933035878a723ef4d83ca1a614c6c4b4d037
[odoo/odoo.git] / addons / report_intrastat / test / report_instratat_report.yml
1 -
2   In order to test the PDF reports defined using report_instratat module, we will create a invoice record
3 -
4   !record {model: account.invoice, id: test_invoice_1}:
5         currency_id: base.EUR
6     company_id: base.main_company
7     address_invoice_id: base.res_partner_address_tang
8     partner_id: base.res_partner_asus
9     state: draft
10     type: out_invoice
11     account_id: account.a_recv
12     name: Test invoice 1
13     address_contact_id: base.res_partner_address_tang
14 -
15   In order to test the PDF reports defined using report_instratat module, we print a Instratat Report
16 -
17   !python {model: account.invoice}: |
18     import netsvc, tools, os
19     (data, format) = netsvc.LocalService('report.account.invoice.intrastat').create(cr, uid, [ref('test_invoice_1')], {}, {})
20     if tools.config['test_report_directory']:
21         file(os.path.join(tools.config['test_report_directory'], 'report_instratat-instrastat_report.'+format), 'wb+').write(data)