Fix invoiced quantity of service products

This commit is contained in:
Nicolas Évrard committed 2011-05-30 16:22:19 +02:00
1 parent f1806531c8
commit f43fd2c5ec
1 file changed
+3 -1
+3 -1
View File
@@ -1080,7 +1080,9 @@ class PurchaseLine(ModelSQL, ModelView):
res['note'] = line.note
if line.type != 'line':
return [res]
if line.purchase.invoice_method == 'order':
if (line.sale.invoice_method == 'order'
or not line.product
or line.product.type == 'service'):
quantity = line.quantity
else:
quantity = 0.0