From eadb7f3f059057287d628703e962cc456c967c8c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?C=C3=A9dric=20Krier?= Date: Mon, 2 Sep 2013 11:19:37 +0200 Subject: [PATCH] Create invoice line for non-line only once issue3292 review1043002 (transplanted from 71fd4a013396386aaee4479c27c05178721b38d5) --- sale.py | 1 + 1 file changed, 1 insertion(+) diff --git a/sale.py b/sale.py index 3d1700aa08..45ed6a8e11 100644 --- a/sale.py +++ b/sale.py @@ -1382,6 +1382,7 @@ class SaleLine(ModelSQL, ModelView): res['note'] = line.note if line.type != 'line': if (line.sale.invoice_method == 'order' + and not line.invoice_lines and ((all(l.quantity >= 0 for l in line.sale.lines if l.type == 'line') and invoice_type == 'out_invoice')