Commit b1725375 authored by Romain Courteaud's avatar Romain Courteaud

slapos_subscription_request: up

parent cd2ee722
context.validate() subscription_change_request = context
context.invalidate()
def invalidate(document, comment):
context.validate()
context.invalidate(comment=comment)
# Subscription Change Request will change an ongoing Open Sale Order
open_sale_order = subscription_change_request.getCausalityValue(portal_type='Open Sale Order')
if (open_sale_order is None) or (open_sale_order.getValidationState() != 'validated'):
return invalidate(subscription_change_request, 'No Open Sale Order to update')
return invalidate(subscription_change_request, 'Unknowned requested changes')
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