Commit fd566dca authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Klaus Wölfel

GeneratedDeliveryBuilder: Do not add quantity to previous movement

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