From 62a35f8b0902691e674f56dd1b2d14ba16f280cf Mon Sep 17 00:00:00 2001 From: "psi (Open ERP)" Date: Fri, 3 Sep 2010 11:56:22 +0530 Subject: [PATCH] [IMP] account_voucher: Improve YML test cases bzr revid: psi@tinyerp.co.in-20100903062622-ftit23h6ugvdm6g0 --- addons/account_voucher/test/sales_payment.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/addons/account_voucher/test/sales_payment.yml b/addons/account_voucher/test/sales_payment.yml index 050eec1d014..6734b4d599c 100644 --- a/addons/account_voucher/test/sales_payment.yml +++ b/addons/account_voucher/test/sales_payment.yml @@ -18,7 +18,7 @@ property_account_receivable: account.a_recv - - Creat an invoice for the partner + Create an invoice for the partner - !record {model: account.invoice, id: account_invoice_0}: account_id: account.a_recv @@ -72,6 +72,8 @@ 'period_id': ref('account.period_8'), 'type': 'receipt', } + if not res['value']['line_cr_ids']: + res['value']['line_cr_ids'] = [{'type': 'cr', 'account_id': ref('account.a_recv'),}] res['value']['line_cr_ids'][0]['amount'] = 450.0 vals['line_cr_ids'] = [(0,0,i) for i in res['value']['line_cr_ids']] id = self.create(cr, uid, vals)