diff options
| author | Azka Nathan <darizkyfaz@gmail.com> | 2025-04-17 08:38:17 +0700 |
|---|---|---|
| committer | Azka Nathan <darizkyfaz@gmail.com> | 2025-04-17 08:38:17 +0700 |
| commit | 30f5cdf7b2537093d9759c49ba027ffd0608acb9 (patch) | |
| tree | bc294e73af0686be570f5c3b24ee674c806b82a5 | |
| parent | e903492969baf706e73fca2a2a85168dfb815219 (diff) | |
push
| -rw-r--r-- | indoteknik_custom/models/stock_picking.py | 4 |
1 files 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)) |
