summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/sale_order.py
diff options
context:
space:
mode:
authorIT Fixcomart <it@fixcomart.co.id>2025-09-19 10:47:10 +0000
committerIT Fixcomart <it@fixcomart.co.id>2025-09-19 10:47:10 +0000
commit84bfce78983a3bac22e647740aeeda2e88426310 (patch)
treee5b0ebd63f11ee35864844425a16bfbc6a0ad547 /indoteknik_custom/models/sale_order.py
parent91436af5fbf15a44130336ddd27f3e020668fbef (diff)
parent4665d0ffe4146d0badc535af2c002ab63ef8cb4b (diff)
Merged in refund_system (pull request #425)
<hafid> refund barang kosong SO indent
Diffstat (limited to 'indoteknik_custom/models/sale_order.py')
-rwxr-xr-xindoteknik_custom/models/sale_order.py10
1 files changed, 0 insertions, 10 deletions
diff --git a/indoteknik_custom/models/sale_order.py b/indoteknik_custom/models/sale_order.py
index 2d8567b0..39830ffc 100755
--- a/indoteknik_custom/models/sale_order.py
+++ b/indoteknik_custom/models/sale_order.py
@@ -3259,16 +3259,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')