diff --git a/purchase.py b/purchase.py index e2f6bd0a65..66e3f10d3a 100644 --- a/purchase.py +++ b/purchase.py @@ -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