diff options
| author | Mqdd <ahmadmiqdad27@gmail.com> | 2026-02-14 11:14:01 +0700 |
|---|---|---|
| committer | Mqdd <ahmadmiqdad27@gmail.com> | 2026-02-14 11:14:01 +0700 |
| commit | 472f36669375d3d0bcecf137e07260fac25d12b3 (patch) | |
| tree | 873a665fd8d3cc249a6460858e85272b838162d3 /indoteknik_custom/models/advance_payment_request.py | |
| parent | 24b33148858c9827ad0b14e716562c377e1644ca (diff) | |
| parent | 37e0beac646ee2e676ff935e8289cf3189b3c21b (diff) | |
Merge branch 'odoo-backup' of https://bitbucket.org/altafixco/indoteknik-addons into gudang-service
Diffstat (limited to 'indoteknik_custom/models/advance_payment_request.py')
| -rw-r--r-- | indoteknik_custom/models/advance_payment_request.py | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/indoteknik_custom/models/advance_payment_request.py b/indoteknik_custom/models/advance_payment_request.py index ed0b0809..8cadb1b6 100644 --- a/indoteknik_custom/models/advance_payment_request.py +++ b/indoteknik_custom/models/advance_payment_request.py @@ -641,10 +641,16 @@ class AdvancePaymentRequest(models.Model): today = date.today() for rec in self: - current_days = rec.days_remaining or 0 - current_due_date = rec.estimated_return_date or False - if rec.type_request == 'pum': - is_settlement_approved = any(s.status == 'approved' for s in rec.settlement_ids) + # current_days = rec.days_remaining or 0 + # current_due_date = rec.estimated_return_date or False + current_days = 0 + current_due_date = False + + is_settlement_approved = any(s.status == 'approved' for s in rec.settlement_ids) + is_pum_canceled = (rec.status == 'cancel') + + if rec.type_request == 'pum' and not is_pum_canceled and not is_settlement_approved: + if not is_settlement_approved: due_date = False |
