[Revert]
authorNajlaâ <nel@tinyerp.com>
Thu, 10 Nov 2011 16:42:32 +0000 (17:42 +0100)
committerNajlaâ <nel@tinyerp.com>
Thu, 10 Nov 2011 16:42:32 +0000 (17:42 +0100)
bzr revid: nel@tinyerp.com-20111110164232-l1948wb1ci97allq

addons/sale/sale.py

index 5cd45e4..fea92c8 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