diff options
| author | it-fixcomart <it@fixcomart.co.id> | 2025-09-19 11:20:10 +0700 |
|---|---|---|
| committer | it-fixcomart <it@fixcomart.co.id> | 2025-09-19 11:20:10 +0700 |
| commit | 4665d0ffe4146d0badc535af2c002ab63ef8cb4b (patch) | |
| tree | 50e1a96792441c32d22dc202b594d1b25d2b5d6a /indoteknik_custom/models/sale_order.py | |
| parent | 9e6ab83ccd890c2ddd4e74cc0ed650d35a12f31e (diff) | |
<hafid> refund barang kosong SO indent
Diffstat (limited to 'indoteknik_custom/models/sale_order.py')
| -rwxr-xr-x | indoteknik_custom/models/sale_order.py | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py index 9cdd9a7b..35d1f087 100755 --- a/indoteknik_custom/models/sale_order.py +++ b/indoteknik_custom/models/sale_order.py @@ -3296,16 +3296,6 @@ class SaleOrder(models.Model): def button_refund(self): self.ensure_one() - - if self.state not in ['cancel', 'sale']: - raise UserError(f"❌ SO {self.name} tidak bisa direfund. Status harus Cancel atau Sale.") - if self.state == 'sale': - not_done_pickings = self.picking_ids.filtered(lambda p: p.state not in ['done', 'cancel']) - if not_done_pickings: - raise UserError( - f"❌ SO {self.name} Belum melakukan kirim barang " - f"({', '.join(not_done_pickings.mapped('name'))}). Selesaikan Pengiriman untuk melakukan refund." - ) invoice_ids = self.invoice_ids.filtered(lambda inv: inv.state != 'cancel') |
