Commit 969ec2f0 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

GeneratedDeliveryBuilder: Do not add quantity to previous movement

parent 8d227bc7
......@@ -93,6 +93,7 @@ class GeneratedDeliveryBuilder(BuilderMixin):
property_dict['quantity'] = simulation_movement.getQuantity()
property_dict['price'] = simulation_movement.getPrice()
if update_existing_movement:
property_dict['quantity'] = (delivery_movement.getQuantity() or 0.0) + property_dict['quantity']
#property_dict['quantity'] = (delivery_movement.getQuantity() or 0.0) + property_dict['quantity']
property_dict['quantity'] = property_dict['quantity']
# Update properties on object (quantity, price...)
delivery_movement._edit(force_update=1, **property_dict)
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