diff --git a/addons/l10n_ch/test/l10n_ch_report.yml b/addons/l10n_ch/test/l10n_ch_report.yml index 8fa79aafb9c..1f4a89b93f4 100644 --- a/addons/l10n_ch/test/l10n_ch_report.yml +++ b/addons/l10n_ch/test/l10n_ch_report.yml @@ -1,8 +1,22 @@ +- + Creating a res.partner.bank record +- + !record {model: res.partner.bank, id: res_partner_bank_account0}: + acc_number: 001-1001-1291-12323 + bank: base.res_bank_1 + bvr_number: 01-101-12 + name: Argolait Main Account + partner_id: base.res_partner_agrolait + sequence: 0.0 + state: bvbank +- + In order to test the BVR report, I will assign a bank to the invoice +- + !record {model: account.invoice, id: account.test_invoice_1}: + partner_bank_id: res_partner_bank_account0 - In order to test the PDF reports defined on a l10n_ch, we will print BVR Report - !python {model: account.invoice}: | - import netsvc, tools, os - (data, format) = netsvc.LocalService('webkitaccount.invoice_bvr').create(cr, uid, [ref('account.test_invoice_1')], {}, {}) - if tools.config['test_report_directory']: - file(os.path.join(tools.config['test_report_directory'], 'l10ch-bvr_report.'+format), 'wb+').write(data) + 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