diff options
| author | AndriFP <113114423+andrifp@users.noreply.github.com> | 2025-09-10 17:56:31 +0700 |
|---|---|---|
| committer | AndriFP <113114423+andrifp@users.noreply.github.com> | 2025-09-10 17:56:31 +0700 |
| commit | 10da5e27e658030f171f694d6696f93e4a472447 (patch) | |
| tree | 14a5f684bae4bc0803ed3c61cb1ce1bed23e33f6 /indoteknik_custom/models/tukar_guling.py | |
| parent | 914bcd75dd2baddb2841cbfba6a64ebd453fecdb (diff) | |
| parent | 4db6034c07414dcd09292e3c41d6fd4598868148 (diff) | |
Merge branch 'odoo-backup' of https://bitbucket.org/altafixco/indoteknik-addons into pum-v2
Diffstat (limited to 'indoteknik_custom/models/tukar_guling.py')
| -rw-r--r-- | indoteknik_custom/models/tukar_guling.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/indoteknik_custom/models/tukar_guling.py b/indoteknik_custom/models/tukar_guling.py index d2e00781..6e839bf0 100644 --- a/indoteknik_custom/models/tukar_guling.py +++ b/indoteknik_custom/models/tukar_guling.py @@ -134,7 +134,7 @@ class TukarGuling(models.Model): if not self.val_inv_opt and self.is_has_invoice == True: raise UserError("Kalau sudah ada invoice Return Invoice Option harus diisi!") for rec in self: - if rec.val_inv_opt == 'cancel_invoice' and self.is_has_invoice == True: + if rec.val_inv_opt == 'cancel_invoice' and self.is_has_invoice == True and rec.invoice_id.state != 'cancel': raise UserError("Tidak bisa mengubah Return karena sudah ada invoice dan belum di cancel.") elif rec.val_inv_opt == 'tanpa_cancel' and self.is_has_invoice == True: continue |
