From cc6e4b9e48752ee54b42db2c16fae7cd5d5af1c4 Mon Sep 17 00:00:00 2001 From: stephanchrst Date: Fri, 23 May 2025 09:02:14 +0700 Subject: quick fix purchasing job conflict with manufacturing order sync to po --- indoteknik_custom/models/automatic_purchase.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'indoteknik_custom/models/automatic_purchase.py') diff --git a/indoteknik_custom/models/automatic_purchase.py b/indoteknik_custom/models/automatic_purchase.py index ff10b814..518dc74c 100644 --- a/indoteknik_custom/models/automatic_purchase.py +++ b/indoteknik_custom/models/automatic_purchase.py @@ -728,10 +728,10 @@ class SaleNotInMatchPO(models.Model): apsm.purchase_tax_id, apsm.note_procurement FROM automatic_purchase_sales_match apsm WHERE apsm.sale_line_id NOT IN ( - SELECT posm.sale_line_id + SELECT distinct coalesce(posm.sale_line_id,0) FROM purchase_order_sales_match posm JOIN purchase_order po ON po.id = posm.purchase_order_id WHERE po.state NOT IN ('cancel') ) ) - """ % self._table) \ No newline at end of file + """ % self._table) -- cgit v1.2.3