summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-05-07 13:47:44 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-05-07 13:47:44 +0700
commit71a780abc391d11c2fe2ea16a953eefd2ff74219 (patch)
tree728c945ce36fc2f40a134c55953e653e17ca5112
parent91810b21b13bc4e3bba20eb26e76caba20286909 (diff)
fix posm query
-rw-r--r--indoteknik_custom/models/automatic_purchase.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/indoteknik_custom/models/automatic_purchase.py b/indoteknik_custom/models/automatic_purchase.py
index a39abba9..d619e160 100644
--- a/indoteknik_custom/models/automatic_purchase.py
+++ b/indoteknik_custom/models/automatic_purchase.py
@@ -699,7 +699,8 @@ class SaleNotInMatchPO(models.Model):
where apsm.sale_line_id not in (
select distinct coalesce(posm.sale_line_id,0)
from purchase_order_sales_match posm
- where posm.state not in ('cancel')
+ left join purchase_order po on po.id = posm.purchase_order_id
+ where po.state not in ('cancel')
)
)
""" % self._table)