summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIndoteknik . <it@fixcomart.co.id>2025-06-12 15:11:06 +0700
committerIndoteknik . <it@fixcomart.co.id>2025-06-12 15:11:06 +0700
commit8ac5d556a6686c6b81d5e9178bff5d308e8f176f (patch)
tree131c0ee448e991ebb51e653f25d65c0c1f0b078e
parentbe7c601f44c3fab282dc91559a62a024d09e3f73 (diff)
(andri) add validasi tidak bisa kirim biteship (stock picking) jika shipping option SO adalah custom
-rw-r--r--indoteknik_custom/models/stock_picking.py3
1 files changed, 3 insertions, 0 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py
index ae3c8f1d..8b03e18d 100644
--- a/indoteknik_custom/models/stock_picking.py
+++ b/indoteknik_custom/models/stock_picking.py
@@ -690,6 +690,9 @@ class StockPicking(models.Model):
def action_send_to_biteship(self):
if self.biteship_tracking_id:
raise UserError(f"Order ini sudah dikirim ke Biteship. Dengan Tracking Id: {self.biteship_tracking_id}")
+
+ if self.sale_id.select_shipping_option == 'custom':
+ raise UserError("Shipping Option pada Sales Order ini adalah *Custom*. Tidak dapat dikirim melalui Biteship.")
def is_courier_need_coordinates(service_code):
return service_code in [