From 316b8257845d0df10153fa7e5e294a699ad17c56 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Tue, 24 Feb 2026 13:20:33 +0700 Subject: push --- indoteknik_custom/models/automatic_purchase.py | 3 +++ 1 file changed, 3 insertions(+) (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 0b2f7d1b..3035ceab 100644 --- a/indoteknik_custom/models/automatic_purchase.py +++ b/indoteknik_custom/models/automatic_purchase.py @@ -744,7 +744,10 @@ class SaleNotInMatchPO(models.Model): 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 + join purchase_order_line pol on pol.order_id = posm.purchase_order_id and pol.product_id = posm.product_id + join stock_move sm on sm.purchase_line_id = pol.id where po.state not in ('cancel') + and sm.state not in ('cancel') ) ) """ % self._table) \ No newline at end of file -- cgit v1.2.3