Commit 167bd157 authored by Xiaowu Zhang's avatar Xiaowu Zhang Committed by Cédric Le Ninivin

erp5_simulation: don't create movement whe quantity is negatif

parent fc771075
......@@ -77,7 +77,7 @@ class QuantityDeliverySolver(XMLObject):
simulation_movement_list = self._getSimulationMovementList()
for movement in simulation_movement_list:
movement.edit(quantity=new_quantity, activate_kw=activate_kw)
if remaining_quantity:
if remaining_quantity > 0:
result.append((movement, remaining_quantity))
return result
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment