Fixed a zero division error when the quantity is zero on an invoice line

bzr revid: ced-8fdb59721f81e4b7a42eacf14fe41272e5ed750f
This commit is contained in:
ced 2007-12-11 08:14:30 +00:00
parent d1a2d38636
commit c813ce998a
1 changed files with 3 additions and 0 deletions

View File

@ -87,6 +87,9 @@ class account_invoice_line(osv.osv):
res = super(account_invoice_line, self)._amount_line(cr, uid, ids, name, args, context)
res2 = res.copy()
for line in self.browse(cr, uid, ids):
if not line.quantity:
res[line.id] = 0.0
continue
if line.invoice_id.price_type == 'tax_included':
product_taxes = None
if line.product_id: