diff options
Diffstat (limited to 'indoteknik_custom/models/automatic_purchase.py')
| -rw-r--r-- | indoteknik_custom/models/automatic_purchase.py | 4 |
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) |
