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: ...@@ -57,12 +57,16 @@ if destination_decision_value is None:
return return
try: try:
subscription_request = service.Resource_createSubscriptionRequest(destination_decision_value, resource_vcl, project_value, currency_value=currency_value, default_price=default_price, subscription_request = service.Resource_createSubscriptionRequest(
item_value=item, causality_value=item) 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: except AssertionError as error:
storeWorkflowComment(item, str(error)) storeWorkflowComment(item, str(error))
return return
if temp_object:
return subscription_request
subscription_request.reindexObject(activate_kw=activate_kw) subscription_request.reindexObject(activate_kw=activate_kw)
item.reindexObject(activate_kw=activate_kw) item.reindexObject(activate_kw=activate_kw)
......
...@@ -50,7 +50,7 @@ ...@@ -50,7 +50,7 @@
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <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>
<item> <item>
<key> <string>id</string> </key> <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