Commit 468b49c8 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_subscription_request: Consider reversal transactions as payment

We can create reversal sale invoice transactions as payments to release allocation the allocation of subscription related instances.
parent 71c9e9ea
...@@ -10,9 +10,9 @@ for packing_list in portal.portal_catalog( ...@@ -10,9 +10,9 @@ for packing_list in portal.portal_catalog(
): ):
for invoice in packing_list.getCausalityRelatedValueList( for invoice in packing_list.getCausalityRelatedValueList(
portal_type="Sale Invoice Transaction"): portal_type="Sale Invoice Transaction"):
payment = invoice.getCausalityRelatedValue( for payment in invoice.getCausalityRelatedValueList(
portal_type="Payment Transaction") portal_type=["Payment Transaction", "Sale Invoice Transaction"]):
if payment is not None and payment.getSimulationState() in ["stopped", "delivered"]: if payment.getSimulationState() in ["stopped", "delivered"]:
return True return True
return False return False
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