summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAzka Nathan <darizkyfaz@gmail.com>2025-03-05 10:14:34 +0700
committerAzka Nathan <darizkyfaz@gmail.com>2025-03-05 10:14:34 +0700
commit660913a45a1efe08f308d405e1011efc9744c553 (patch)
tree640fa6c2c556d194b42bfb177fa1591f4c60d2de
parent20a56a76c519eba82f70ea1443e272ac64797dd9 (diff)
push
-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 dfc33caa..df91d451 100644
--- a/indoteknik_custom/models/stock_picking.py
+++ b/indoteknik_custom/models/stock_picking.py
@@ -815,6 +815,9 @@ class StockPicking(models.Model):
raise UserError('Quantity Done melebihi Quantity Onhand')
def button_validate(self):
+ if len(self.scan_koli_lines) == 0 and 'BU/OUT/' in self.name and self.picking_type_code == 'outgoing':
+ raise UserError(_("Tidak ada scan koli! Harap periksa kembali."))
+
if self.total_koli > self.total_so_koli:
raise UserError(_("Total Koli (%s) dan Total SO Koli (%s) tidak sama! Harap periksa kembali.")
% (self.total_koli, self.total_so_koli))