Commit d072f93e authored by Cédric Le Ninivin's avatar Cédric Le Ninivin Committed by Your Name

GeneratedDeliveryBuilder: Do not add quantity to previous movement

parent fae5a7e4
...@@ -101,6 +101,7 @@ class GeneratedDeliveryBuilder(BuilderMixin): ...@@ -101,6 +101,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