Commit bd6366c0 authored by Romain Courteaud's avatar Romain Courteaud

slapos_panel: add activate_kw parameter

parent 57063d0e
......@@ -7,7 +7,8 @@ customer = context
project = portal.project_module.newContent(
portal_type='Project',
destination_value=customer,
title=title
title=title,
activate_kw=activate_kw
)
project.validate()
......@@ -26,7 +27,7 @@ except AssertionError, e:
},
abort_transaction=True,
)
subscription_request.reindexObject(activate_kw=activate_kw)
# XXX How to specify the trade condition containing the currency and trade model lines?
specialise_value = subscription_request.getSpecialiseValue(portal_type="Sale Trade Condition")
......@@ -43,12 +44,14 @@ if specialise_value is None:
customer.newContent(
portal_type='Assignment',
destination_project_value=project,
function='production/manager'
function='production/manager',
activate_kw=activate_kw
).open()
customer.newContent(
portal_type='Assignment',
destination_project_value=project,
function='customer'
function='customer',
activate_kw=activate_kw
).open()
# Compute Node trade condition
......@@ -69,7 +72,8 @@ sale_trade_condition = portal.sale_trade_condition_module.newContent(
source_value=subscription_request.getSourceValue(),
source_section_value=source_section_value,
#source_payment_value=seller_bank_account,
price_currency_value=currency_value
price_currency_value=currency_value,
activate_kw=activate_kw
)
sale_trade_condition.validate()
......@@ -91,7 +95,8 @@ sale_trade_condition = portal.sale_trade_condition_module.newContent(
source_value=subscription_request.getSourceValue(),
source_section_value=source_section_value,
#source_payment_value=seller_bank_account,
price_currency_value=currency_value
price_currency_value=currency_value,
activate_kw=activate_kw
)
sale_trade_condition.validate()
......
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>title, is_compute_node_payable , is_instance_tree_payable, price_currency, batch=0, **kw</string> </value>
<value> <string>title, is_compute_node_payable , is_instance_tree_payable, price_currency, batch=0, activate_kw=None, **kw</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