From 71a780abc391d11c2fe2ea16a953eefd2ff74219 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Wed, 7 May 2025 13:47:44 +0700 Subject: fix posm query --- indoteknik_custom/models/automatic_purchase.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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) -- cgit v1.2.3