From 30f5cdf7b2537093d9759c49ba027ffd0608acb9 Mon Sep 17 00:00:00 2001 From: Azka Nathan Date: Thu, 17 Apr 2025 08:38:17 +0700 Subject: push --- indoteknik_custom/models/stock_picking.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/indoteknik_custom/models/stock_picking.py b/indoteknik_custom/models/stock_picking.py index 85428aa0..97607502 100644 --- a/indoteknik_custom/models/stock_picking.py +++ b/indoteknik_custom/models/stock_picking.py @@ -1667,13 +1667,13 @@ class CheckProduct(models.Model): # Calculate the total quantity after addition total_quantity = sum(existing_lines.mapped('quantity')) - record.quantity - if total_quantity == total_qty_in_moves: + if total_quantity > total_qty_in_moves: raise UserError(( "Quantity Product '%s' sudah melebihi quantity demand." ) % (record.product_id.display_name)) else: # Check if the quantity exceeds the allowed total - if record.quantity == total_qty_in_moves: + if record.quantity > total_qty_in_moves: raise UserError(( "Quantity Product '%s' sudah melebihi quantity demand." ) % (record.product_id.display_name)) -- cgit v1.2.3