From 804bc3a916916eb5c32ef44e8bc5b5f37c89078d Mon Sep 17 00:00:00 2001 From: Josse Colpaert Date: Mon, 4 Mar 2013 16:55:50 +0100 Subject: [PATCH] [FIX] in case of no taxes bzr revid: jco@openerp.com-20130304155550-g5m12ryt6id0b3m3 --- addons/hr_expense/hr_expense.py | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/addons/hr_expense/hr_expense.py b/addons/hr_expense/hr_expense.py index fb8af6649de..f61f8923411 100644 --- a/addons/hr_expense/hr_expense.py +++ b/addons/hr_expense/hr_expense.py @@ -306,9 +306,6 @@ class hr_expense_expense(osv.osv): # within: iml = self.pool.get('account.invoice.line').move_line_get iml = self.move_line_get(cr, uid, exp.id, context=context) - #Write taxes on the lines which should automatically add the necessary extra lines upon creation - - diff_currency_p = exp.currency_id.id <> company_currency # create one move line for the total @@ -385,7 +382,7 @@ 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: + if not taxes: taxes = [] #Calculating tax on the line and creating move? for tax in tax_obj.compute_all(cr, uid, taxes,