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

erp5_simulation: keep one sm in order to be able to generate divergence

parent f06a054a
......@@ -85,8 +85,11 @@ class QuantityDeliverySolver(XMLObject):
for movement in simulation_movement_list:
movement.edit(delivery_ratio=movement.getQuantity() / new_quantity, activate_kw=activate_kw)
else:
# zero quantity
movement = simulation_movement_list.pop()
movement.edit(delivery_ratio=1, quantity=0, activate_kw=activate_kw)
for movement in simulation_movement_list:
movement.edit(delivery_ratio=0, activate_kw=activate_kw)
movement.edit(delivery_ratio=0, quantity=0, activate_kw=activate_kw)
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