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