summaryrefslogtreecommitdiff
path: root/indoteknik_custom/models/stock_picking.py
diff options
context:
space:
mode:
Diffstat (limited to 'indoteknik_custom/models/stock_picking.py')
-rw-r--r--indoteknik_custom/models/stock_picking.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py
index 84a374c5..d19214d2 100644
--- a/indoteknik_custom/models/stock_picking.py
+++ b/indoteknik_custom/models/stock_picking.py
@@ -145,8 +145,10 @@ class StockPicking(models.Model):
continue
raise UserError('Sudah pernah dikirim kalender')
+ is_delivered_validation = self.env['ir.config_parameter'].get_param(
+ 'stock_picking.qty_delivered_validation')
for line in self.move_line_ids_without_package:
- if line.move_id.sale_line_id and self.picking_type_id.code == 'outgoing':
+ if line.move_id.sale_line_id and self.picking_type_id.code == 'outgoing' and is_delivered_validation == 'Y':
if line.move_id.sale_line_id.qty_delivered + line.qty_done > line.move_id.sale_line_id.product_uom_qty:
raise UserError("Qty Delivered akan lebih dari Qty SO")