+-
+ I Partner data to Test BVR printing.
+-
+ !record {model: res.partner.category, id: res_partner_category_bvr}:
+ name: Customers
+-
+ I create BVR DUMMY Customer.
+-
+ !record {model: res.partner, id: res_partner_bvr}:
+ category_id:
+ - res_partner_category_bvr
+ name: BVR DUMMY
+-
+ I create contact address for BVR DUMMY.
+-
+ !record {model: res.partner.address, id: res_partner_address_1}:
+ partner_id: res_partner_bvr
+ street: Route de B\8elario
+ type: contact
+-
+ I create invoice address for BVR DUMMY.
+-
+ !record {model: res.partner.address, id: res_partner_address_2}:
+ partner_id: res_partner_bvr
+ street: Route de B\8elario
+ type: invoice
+-
+ I create delivery address for BVR DUMMY.
+-
+ !record {model: res.partner.address, id: res_partner_address_3}:
+ partner_id: res_partner_bvr
+ street: Route de B\8elario
+ type: delivery
+
+-
+ In order to test the PDF BVR webkit reports defined on an invoice, we will create a Invoice Record
+-
+ !record {model: account.invoice, id: l10n_ch_invoice}:
+ currency_id: base.CHF
+ company_id: base.main_company
+ address_invoice_id: res_partner_address_2
+ partner_id: res_partner_bvr
+ state: draft
+ type: out_invoice
+ account_id: account.a_recv
+ name: BVR test invoice
+ address_contact_id: res_partner_address_1
+
-
In order to test the BVR report, I will assign a bank to the invoice
-
- !record {model: account.invoice, id: account.test_invoice_1}:
+ !record {model: account.invoice, id: l10n_ch_invoice}:
partner_bank_id: main_partner_bank
-
In order to test the PDF reports defined on a l10n_ch, we will print BVR Report
-
!python {model: account.invoice}: |
from tools.test_reports import try_report
- try_report(cr, uid, 'report.invoice_web_bvr', [ref('account.test_invoice_1')])
\ No newline at end of file
+ company = self.pool.get('res.users').browse(cr, uid, uid).company_id
+ company.lib_path and try_report(cr, uid, 'report.invoice_web_bvr', [ref('l10n_ch_invoice')]) or 'Webkit lib not set'
\ No newline at end of file