[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:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user