[MERGE] Merged Chs' branch for the fix of Account : Web client sends values of M2M fields in tuple so converting to list.(Ref : 4346,5340)

bzr revid: jvo@tinyerp.com-20110420122823-92ti1pvc02dytixo
This commit is contained in:
Jay Vora (OpenERP)
2011-04-20 17:58:23 +05:30
+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