~openerp-dev/openobject-addons/6.1-opw-579908-msh

« back to all changes in this revision

Viewing changes to l10n_ch/test/l10n_ch_report.yml

  • Committer: qdp-launchpad at tinyerp
  • Author(s): niv at openerp
  • Date: 2010-11-09 12:31:13 UTC
  • mfrom: (3164.136.49 addons)
  • Revision ID: qdp-launchpad@tinyerp.com-20101109123113-fjx90w5eeqo0imkd
Tags: openerp-buildfail-1-3151
[MERGE] merged the localization branch

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
1
-
2
 
  In order to test the PDF reports defined on a l10n_ch, 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
2
  In order to test the PDF reports defined on a l10n_ch, we will print BVR Report
16
3
-
17
4
  !python {model: account.invoice}: |
18
5
    import netsvc, tools, os
19
 
    run_str = 'cp ' + tools.config['addons_path'] + '/l10n_ch/report/ocrbb.ttf' + ' ' + '/tmp/ocrbb.ttf'
 
6
    run_str = 'cp ' + tools.config['addons_path'] + '/l10n_ch/report/ocrbb.ttf' + ' ' + '/tmp/ocrbb.ttf' 
20
7
    os.system(run_str)
21
 
    (data, format) = netsvc.LocalService('report.l10n_ch.bvr').create(cr, uid, [ref('test_invoice_1')], {}, {})
 
8
    (data, format) = netsvc.LocalService('report.l10n_ch.bvr').create(cr, uid, [ref('account.test_invoice_1')], {}, {})
22
9
    if tools.config['test_report_directory']:
23
10
        file(os.path.join(tools.config['test_report_directory'], 'l10ch-bvr_report.'+format), 'wb+').write(data)
24
11
 
27
14
-
28
15
  !python {model: account.invoice}: |
29
16
    import netsvc, tools, os
30
 
    (data, format) = netsvc.LocalService('report.l10n_ch.invoice.bvr').create(cr, uid, [ref('test_invoice_1')], {}, {})
 
17
    (data, format) = netsvc.LocalService('report.l10n_ch.invoice.bvr').create(cr, uid, [ref('account.test_invoice_1')], {}, {})
31
18
    if tools.config['test_report_directory']:
32
19
        file(os.path.join(tools.config['test_report_directory'], 'l10ch-bvr_invoice_report.'+format), 'wb+').write(data)