Commit ce525239 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_subscription_request: Allow to create temp subscription request

  This allows to to getPrice before actual create a subscription request.
parent 45c604cb
......@@ -57,12 +57,16 @@ if destination_decision_value is None:
return
try:
subscription_request = service.Resource_createSubscriptionRequest(destination_decision_value, resource_vcl, project_value, currency_value=currency_value, default_price=default_price,
item_value=item, causality_value=item)
subscription_request = service.Resource_createSubscriptionRequest(
destination_decision_value, resource_vcl, project_value, currency_value=currency_value,
default_price=default_price, item_value=item, causality_value=item, temp_object=temp_object)
except AssertionError as error:
storeWorkflowComment(item, str(error))
return
if temp_object:
return subscription_request
subscription_request.reindexObject(activate_kw=activate_kw)
item.reindexObject(activate_kw=activate_kw)
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>currency_value=None, default_price=None, activate_kw=None, REQUEST=None</string> </value>
<value> <string>currency_value=None, default_price=None, activate_kw=None, temp_object=False, REQUEST=None</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
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