2 In order to test the PDF reports defined on a l10n_ch, we will create a invoice record
4 !record {model: account.invoice, id: test_invoice_1}:
6 company_id: base.main_company
7 address_invoice_id: base.res_partner_address_tang
8 partner_id: base.res_partner_asus
11 account_id: account.a_recv
13 address_contact_id: base.res_partner_address_tang
15 In order to test the PDF reports defined on a l10n_ch, we will print BVR Report
17 !python {model: account.invoice}: |
18 import netsvc, tools, os
19 run_str = 'cp ' + tools.config['addons_path'] + '/l10n_ch/report/ocrbb.ttf' + ' ' + '/tmp/ocrbb.ttf'
21 (data, format) = netsvc.LocalService('report.l10n_ch.bvr').create(cr, uid, [ref('test_invoice_1')], {}, {})
22 if tools.config['test_report_directory']:
23 file(os.path.join(tools.config['test_report_directory'], 'l10ch-bvr_report.'+format), 'wb+').write(data)
26 In order to test the PDF reports defined on a l10n_ch, we will print a BVR Invoice Report
28 !python {model: account.invoice}: |
29 import netsvc, tools, os
30 (data, format) = netsvc.LocalService('report.l10n_ch.invoice.bvr').create(cr, uid, [ref('test_invoice_1')], {}, {})
31 if tools.config['test_report_directory']:
32 file(os.path.join(tools.config['test_report_directory'], 'l10ch-bvr_invoice_report.'+format), 'wb+').write(data)