From 1c73ff956137e6abef8dfb95f5c245efe6145aa1 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Wed, 27 Mar 2024 16:42:53 +0700 Subject: trying to fix bug on apo --- indoteknik_custom/models/automatic_purchase.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/indoteknik_custom/models/automatic_purchase.py b/indoteknik_custom/models/automatic_purchase.py index 3e2d31e7..6acc8424 100644 --- a/indoteknik_custom/models/automatic_purchase.py +++ b/indoteknik_custom/models/automatic_purchase.py @@ -262,7 +262,7 @@ class AutomaticPurchase(models.Model): purchase_line = self.env['automatic.purchase.line'].search([ ('automatic_purchase_id', '=', self.id), ('product_id', 'in', [sales_match.product_id.id]), - ]) + ], limit=1) matches_po_line = { 'sales_order_id' : sales_match.sale_id.id, -- cgit v1.2.3