diff options
| author | FIN-IT_AndriFP <it@fixcomart.co.id> | 2025-10-28 17:42:59 +0700 |
|---|---|---|
| committer | FIN-IT_AndriFP <it@fixcomart.co.id> | 2025-10-28 17:42:59 +0700 |
| commit | fe27356afbbc399fefea84692c1f04b5d05547e1 (patch) | |
| tree | 5ab9674ef73a8f39a4dcd11bda2fd23883a6b5ba | |
| parent | b95b268f66a82c0d1703f9d7644d3575b63f345d (diff) | |
(andri) fix save
| -rw-r--r-- | indoteknik_custom/models/advance_payment_request.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/indoteknik_custom/models/advance_payment_request.py b/indoteknik_custom/models/advance_payment_request.py index 7be9b00d..5a465ca4 100644 --- a/indoteknik_custom/models/advance_payment_request.py +++ b/indoteknik_custom/models/advance_payment_request.py @@ -810,7 +810,12 @@ class AdvancePaymentRequest(models.Model): vals['number'] = self.env['ir.sequence'].next_by_code('advance.payment.request') or 'New Draft' # vals['status'] = 'pengajuan1' - return super(AdvancePaymentRequest, self).create(vals) + # return super(AdvancePaymentRequest, self).create(vals) + rec = super(AdvancePaymentRequest, self).create(vals) + if rec.type_request == 'reimburse': + rec._compute_grand_total_reimburse() + rec.nominal = rec.grand_total_reimburse + return rec class AdvancePaymentUsageLine(models.Model): |
