summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/automatic_purchase.py
diff options
context:
space:
mode:
authorstephanchrst <stephanchrst@gmail.com>2025-05-23 09:02:14 +0700
committerstephanchrst <stephanchrst@gmail.com>2025-05-23 09:02:14 +0700
commitcc6e4b9e48752ee54b42db2c16fae7cd5d5af1c4 (patch)
tree95d42034b88b19ae568efd8fb3221fce1b7eded3 /indoteknik_custom/models/automatic_purchase.py
parentcbf9eff4c2f934491b3a1adbf56255c14c4852ea (diff)
quick fix purchasing job conflict with manufacturing order sync to po
Diffstat (limited to 'indoteknik_custom/models/automatic_purchase.py')
-rw-r--r--indoteknik_custom/models/automatic_purchase.py4
1 files changed, 2 insertions, 2 deletions
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)