diff options
| author | stephanchrst <stephanchrst@gmail.com> | 2024-11-11 13:53:22 +0700 |
|---|---|---|
| committer | stephanchrst <stephanchrst@gmail.com> | 2024-11-11 13:53:22 +0700 |
| commit | e573a766b997e4dc60935f8cc87e887d09f64b7a (patch) | |
| tree | a02275799de68cc7214625911ef60c64d0af4610 /indoteknik_custom/models/requisition.py | |
| parent | 03e9f9e8997836e37a5ab38798edb310ce6a6c76 (diff) | |
add sale order condition in match requisition
Diffstat (limited to 'indoteknik_custom/models/requisition.py')
| -rw-r--r-- | indoteknik_custom/models/requisition.py | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/indoteknik_custom/models/requisition.py b/indoteknik_custom/models/requisition.py index 68c57e4c..583a25c4 100644 --- a/indoteknik_custom/models/requisition.py +++ b/indoteknik_custom/models/requisition.py @@ -28,6 +28,11 @@ class RequisitionMatchPO(models.Model): from requisition_line rl join requisition r on r.id = rl.requisition_id join requisition_purchase_match rpm on rpm.requisition_id = r.id + join purchase_order po on po.id = rpm.order_id + join sale_order so on so.id = r.sale_order_id + where r.date_doc >= '2024-11-11' + and po.state in ('done', 'purchase') + and so.state in ('draft', 'sent') """ % self._table) |
