Commit bbebfa5b authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_accounting: Set causality into the sale packing list to subscription request

parent 06f2ac0b
...@@ -51,9 +51,12 @@ for movement in movement_list: ...@@ -51,9 +51,12 @@ for movement in movement_list:
temp_movement.edit(price=0.0) temp_movement.edit(price=0.0)
hosting_subscription = movement.getAggregateValue(portal_type="Hosting Subscription") hosting_subscription = movement.getAggregateValue(portal_type="Hosting Subscription")
if hosting_subscription is not None and \ if hosting_subscription is not None:
hosting_subscription.getAggregateRelated(portal_type="Subscription Request"): subscription = hosting_subscription.getAggregateRelated(portal_type="Subscription Request")
temp_movement.edit(specialise=subscription_request_specialise) if subscription is not None:
temp_movement.edit(
specialise=subscription_request_specialise,
causality=subscription)
temp_movement_list.append(temp_movement) temp_movement_list.append(temp_movement)
......
...@@ -18,7 +18,8 @@ for movement in movement_list: ...@@ -18,7 +18,8 @@ for movement in movement_list:
destination_section=movement.getDestination(), destination_section=movement.getDestination(),
destination_decision=movement.getDestination(), destination_decision=movement.getDestination(),
specialise=movement.getSpecialise(), specialise=movement.getSpecialise(),
price_currency=movement.getPriceCurrency() price_currency=movement.getPriceCurrency(),
causality=movement.getCausality()
) )
delivery.confirm('New aggregated delivery.') delivery.confirm('New aggregated delivery.')
person.Person_setAggregatedDelivery(delivery) person.Person_setAggregatedDelivery(delivery)
......
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