[MERGE] remove res.partner.address by chs
[odoo/odoo.git] / addons / l10n_ch / test / l10n_ch_report.yml
1 -
2   In order to test BVR printing. I create Partner data .
3 -
4   !record {model: res.partner.category, id: res_partner_category_bvr}:
5     name: Customers
6 -
7   I create BVR DUMMY Customer.
8 -
9   !record {model: res.partner, id: res_partner_bvr}:
10     category_id:
11       - res_partner_category_bvr
12     name: BVR DUMMY
13 -
14   I create contact address for BVR DUMMY.
15 -
16   !record {model: res.partner, id: res_partner_address1}:
17     name: 'Luc Maurer'
18     parent_id: res_partner_bvr
19     street: Route de Bélario
20     type: contact
21 -
22   I create invoice address for BVR DUMMY.
23 -
24   !record {model: res.partner, id: res_partner_address2}:
25     name: 'Ferdinand Gassauer'
26     parent_id: res_partner_bvr
27     street: Route de Bélario
28     type: invoice
29 -
30   I create delivery address for BVR DUMMY.
31 -
32   !record {model: res.partner, id: res_partner_address3}:
33     name: 'Claude Philipona'
34     parent_id: res_partner_bvr
35     street: Route de Bélario
36     type: delivery
37
38 -
39   In order to test the PDF BVR webkit reports defined on an invoice, we will create a Invoice Record
40 -
41   !record {model: account.invoice, id: l10n_ch_invoice, view: False}:
42     currency_id: base.CHF
43     company_id: base.main_company
44     partner_id: res_partner_bvr
45     state: draft
46     type: out_invoice
47     account_id: account.a_recv
48     name: BVR test invoice
49
50 -
51   In order to test the BVR report, I will assign a bank to the invoice
52 -
53   !record {model: account.invoice, id: l10n_ch_invoice, view: False}:
54       partner_bank_id: main_partner_bank
55 -
56   In order to test the PDF reports defined on a l10n_ch, we will print BVR Report
57 -
58   !python {model: account.invoice}: |
59     from tools.test_reports import try_report
60     company = self.pool.get('res.users').browse(cr, uid, uid).company_id
61     try_report(cr, uid, 'report.invoice_web_bvr', [ref('l10n_ch_invoice')]) or 'Unable to find Webkit'