[FIX] account: correct default unit price for supplier invoices (issue #4346)

bzr revid: chs@openerp.com-20110308164037-iknvpeo079u68bo5
This commit is contained in:
Christophe Simonis
2011-03-08 17:40:37 +01:00
parent 9cfdc4248c
commit 6b7a10e4bf
+1 -1
View File
@@ -1258,7 +1258,7 @@ class account_invoice_line(osv.osv):
t = t - (p * l[2].get('quantity'))
taxes = l[2].get('invoice_line_tax_id')
if len(taxes[0]) >= 3 and taxes[0][2]:
taxes = tax_obj.browse(cr, uid, taxes[0][2])
taxes = tax_obj.browse(cr, uid, list(taxes[0][2]))
for tax in tax_obj.compute_all(cr, uid, taxes, p,l[2].get('quantity'), context.get('address_invoice_id', False), l[2].get('product_id', False), context.get('partner_id', False))['taxes']:
t = t - tax['amount']
return t