From 1e3725b9e6cc0f167dd3000844dc3d13e64dff98 Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Mon, 4 Mar 2013 15:47:22 +0100 Subject: [PATCH] [FIX] adjust tests and no taxes when product not available bzr revid: jco@openerp.com-20130304144722-y30nkmmd8hyby7x0 --- addons/hr_expense/hr_expense.py | 2 ++ addons/hr_expense/test/expense_process.yml | 5 ----- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py index 03475c90b04..fb8af6649de 100644 --- a/addons/hr_expense/hr_expense.py +++ b/addons/hr_expense/hr_expense.py @@ -385,6 +385,8 @@ class hr_expense_expense(osv.osv): a = fpos_obj.map_account(cr, uid, fpos, a) taxes = a and self.pool.get('account.account').browse(cr, uid, a, context=context).tax_ids or False tax_id = fpos_obj.map_tax(cr, uid, fpos, taxes) + else: + taxes = [] #Calculating tax on the line and creating move? for tax in tax_obj.compute_all(cr, uid, taxes, line.unit_amount , diff --git a/addons/hr_expense/test/expense_process.yml b/addons/hr_expense/test/expense_process.yml index eae63c460fc..4b65c16e8ea 100644 --- a/addons/hr_expense/test/expense_process.yml +++ b/addons/hr_expense/test/expense_process.yml @@ -26,11 +26,6 @@ !python {model: hr.expense.expense}: | sep_expenses = self.browse(cr, uid, ref("sep_expenses"), context=context) assert sep_expenses.state == 'done', "Expense should be in 'Done' state." - assert sep_expenses.voucher_id, "Expense should have link of Purchase Receipt." - assert sep_expenses.voucher_id.type == 'purchase', "Receipt type is not purchase receipt." - assert sep_expenses.voucher_id.amount == sep_expenses.amount,"Receipt total amount is not correspond with expense total." - assert len(sep_expenses.voucher_id.line_dr_ids) == len(sep_expenses.line_ids),"Lines of Receipt and expense line are not correspond." - - I duplicate the expenses and cancel duplicated. -