[FIX] purchase: stop when PO line found

If a PO line matching the procurement is found, stop the loop. This
would be an issue if more than one line match the criteria.
This commit is contained in:
Nicolas Martinelli
2015-11-27 12:47:13 +01:00
parent 2eccd6352f
commit 83181547f9
+1
View File
@@ -860,6 +860,7 @@ class ProcurementOrder(models.Model):
'price_unit': price_unit,
'procurement_ids': [(4, procurement.id)]
})
break
if not po_line:
vals = procurement._prepare_purchase_order_line(po, supplier)
self.env['purchase.order.line'].create(vals)