Commit 168f1263 authored by Rafael Monnerat's avatar Rafael Monnerat

slapos_web: Non-service providers don't choose versions

People which are not service providers don't pick versions of the software releases, they get the latest.
parent 2f02f662
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string encoding="cdata"><![CDATA[
person = context.getPortalObject().ERP5Site_getAuthenticatedMemberPersonValue()\n
\n
if person is None or person.Person_isServiceProvider():\n
return "<a href=%s/SoftwareProduct_viewSoftwareReleaseOrderDialog> Order Now </a>" % cell.absolute_url()\n
\n
software_release_list = cell.SoftwareProduct_getSortedSoftwareReleaseList()\n
\n
if not software_release_list:\n
return "<a href=%s/SoftwareProduct_viewSoftwareReleaseOrderDialog> Order Now </a>" % cell.absolute_url()\n
\n
latest_software_release = software_release_list[0]\n
\n
return "<a href=%s/SoftwareRelease_viewRequestDialog> Order Now </a>" % latest_software_release.absolute_url()\n
]]></string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>cell</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>SoftwareProduct_getSoftwareReleaseOrderLink</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
......@@ -12,7 +12,6 @@
<list>
<string>columns</string>
<string>css_class</string>
<string>default_params</string>
<string>list_method</string>
<string>select</string>
<string>selection_name</string>
......@@ -101,21 +100,6 @@
<key> <string>css_class</string> </key>
<value> <string>nolabel</string> </value>
</item>
<item>
<key> <string>default_params</string> </key>
<value>
<list>
<tuple>
<string>portal_type</string>
<string>Software Product</string>
</tuple>
<tuple>
<string>validation_state</string>
<string>published</string>
</tuple>
</list>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_list_mode_listbox</string> </value>
......@@ -179,7 +163,7 @@
<dictionary>
<item>
<key> <string>method_name</string> </key>
<value> <string>portal_catalog</string> </value>
<value> <string>WebSection_getPublishedSoftwareProductValueList</string> </value>
</item>
</dictionary>
</pickle>
......
......@@ -111,11 +111,7 @@ Order Now >
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string encoding="cdata"><![CDATA[
python: "<a href=%s/SoftwareProduct_viewSoftwareReleaseOrderDialog> Order Now </a>" % cell.absolute_url()
]]></string> </value>
<value> <string>python: cell.SoftwareProduct_getSoftwareReleaseOrderLink(cell)</string> </value>
</item>
</dictionary>
</pickle>
......
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