[FIX] when invoic
authorNajlaâ <nel@tinyerp.com>
Thu, 10 Nov 2011 15:04:26 +0000 (16:04 +0100)
committerNajlaâ <nel@tinyerp.com>
Thu, 10 Nov 2011 15:04:26 +0000 (16:04 +0100)
bzr revid: nel@tinyerp.com-20111110150426-63engcsgb1nuoepv

addons/sale/sale.py

index fea92c8..5cd45e4 100644 (file)
@@ -472,13 +472,13 @@ class sale_order(osv.osv):
             #
             # Update the sale order lines state (and invoiced flag).
             #
+            invoiced = False
             for line in order.order_line:
                 vals = {}
                 #
                 # Check if the line is invoiced (has asociated invoice
                 # lines from non-cancelled invoices).
                 #
-                invoiced = False
                 for iline in line.invoice_lines:
                     if iline.invoice_id and iline.invoice_id.state != 'cancel':
                         invoiced = True