Commit 4c35d58d authored by Romain Courteaud's avatar Romain Courteaud

slapos_panel: requires Release/Type variations when creating Software Product

parent 9453f216
......@@ -4,11 +4,20 @@ portal = context.getPortalObject()
software_product = portal.software_product_module.newContent(
title=title,
reference=reference,
follow_up_value=context
)
software_product.newContent(
portal_type="Software Product Release Variation",
url_string=software_release
)
software_product.newContent(
portal_type="Software Product Type Variation",
title=software_type
)
software_product.validate()
return software_product.Base_redirect(
message=translateString('New Software Product created.')
keep_items={
'portal_status_message': translateString('New Software Product created.')
}
)
......@@ -50,7 +50,7 @@
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>title, reference, **kw</string> </value>
<value> <string>title, software_release, software_type, **kw</string> </value>
</item>
<item>
<key> <string>id</string> </key>
......
......@@ -91,7 +91,8 @@
<value>
<list>
<string>your_title</string>
<string>your_reference</string>
<string>your_software_release</string>
<string>your_software_type</string>
</list>
</value>
</item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>required</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_software_release</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
<value>
<dictionary>
<item>
<key> <string>external_validator_failed</string> </key>
<value> <string>The input failed the external validator.</string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>overrides</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Software Release</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -11,12 +11,13 @@
<value>
<list>
<string>required</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_reference</string> </value>
<value> <string>your_software_type</string> </value>
</item>
<item>
<key> <string>message_values</string> </key>
......@@ -65,7 +66,7 @@
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_dialog_mode_reference</string> </value>
<value> <string>my_string_field</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
......@@ -75,6 +76,10 @@
<key> <string>required</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Software Type</string> </value>
</item>
</dictionary>
</value>
</item>
......
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