Reviewers: ,


Please review this at http://codereview.tryton.org/31004/

Affected files:
  M purchase.py


Index: purchase.py
===================================================================

--- a/purchase.py
+++ b/purchase.py
@@ -1080,7 +1080,9 @@
         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



--
[email protected] mailing list

Reply via email to