Commit cd121abd authored by Gabriel Monnerat's avatar Gabriel Monnerat

add condition to change the portal type to Slave Instance if the parameter slave is True

parent 28df85c3
......@@ -62,12 +62,17 @@ software_title = kwargs["software_title"]\n
software_type = kwargs.get("software_type") or "RootSoftwareInstance"\n
instance_xml = kwargs["instance_xml"]\n
sla_xml = kwargs.get("sla_xml") or ""\n
is_slave = kwargs.get(\'slave\', False)\n
\n
sale_order_portal_type = "Sale Order"\n
sale_order_line_portal_type = "Sale Order Line"\n
software_instance_portal_type = "Software Instance"\n
hosting_subscription_portal_type = "Hosting Subscription"\n
\n
if is_slave == True:\n
software_instance_portal_type = "Slave Instance"\n
else:\n
software_instance_portal_type = "Software Instance"\n
\n
# XXX Hardcoded values\n
seller = portal.restrictedTraverse("organisation_module/vifib_internet")\n
currency = portal.restrictedTraverse("currency_module/EUR")\n
......
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