From 14ae4182e2e8a511f16ed7ccc3b37356b278b1b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 2 Sep 2013 11:21:19 +0200 Subject: [PATCH] Create invoice line for non-line only once issue3292 review1043003 (transplanted from 399d66f4e5262cffe86254af3f43074f2e43418d) --- purchase.py | 1 + 1 file changed, 1 insertion(+) diff --git a/purchase.py b/purchase.py index 7f5c5d3a53..0e6c90216e 100644 --- a/purchase.py +++ b/purchase.py @@ -1237,6 +1237,7 @@ class PurchaseLine(ModelSQL, ModelView): res['note'] = line.note if line.type != 'line': if (line.purchase.invoice_method == 'order' + and not line.invoice_lines and (all(l.quantity >= 0 for l in line.sale.lines if l.type == 'line') or all(l.quantity <= 0 for l in line.sale.lines