Commit c7b5862f authored by Łukasz Nowak's avatar Łukasz Nowak

Remove obsoleted functionality related with PPLs.

parent 8b34ae1b
......@@ -59,38 +59,19 @@ software_installation_list = portal.portal_catalog(\n
validation_state=\'validated\',\n
limit=1,\n
url_string={\'query\': portal.portal_catalog.getResultValue(uid=software_release_uid).getUrlString(), \'key\': \'ExactMatch\'},\n
sort_on=((\'creation_date\', \'DESC\'),)\n
)\n
\n
if len(software_installation_list) == 0:\n
return \'Destroyed\' \n
\n
software_installation = software_installation_list[0].getObject()\n
delivery = software_installation.getCausalityValue(portal_type=\'Purchase Packing List\')\n
if delivery is None:\n
s = software_installation.getSlapState()\n
if s == \'start_requested\':\n
return \'Installation requested\'\n
else:\n
return \'Destruction requested\'\n
\n
delivery_line = delivery.contentValues(portal_type=\'Purchase Packing List Line\')[0]\n
resource = delivery_line.getResource()\n
state = delivery_line.getSimulationState()\n
\n
if resource == portal.portal_preferences.getPreferredSoftwareSetupResource():\n
if state == \'confirmed\':\n
s = software_installation.getSlapState()\n
if s == \'start_requested\':\n
return \'Installation requested\'\n
elif state == \'started\':\n
return \'Installation in progress\'\n
elif state == \'stopped\':\n
return \'Installed\'\n
else:\n
return \'Destroyed\'\n
elif resource == portal.portal_preferences.getPreferredSoftwareCleanupResource():\n
if state == \'confirmed\':\n
else:\n
return \'Destruction requested\'\n
else:\n
return \'Destroyed\'\n
</string> </value>
</item>
<item>
......
......@@ -92,7 +92,6 @@
<list>
<string>your_busy_computer_partition_list_image</string>
<string>listbox_image</string>
<string>listbox_parent_state</string>
<string>listbox_software_release</string>
<string>listbox_installation_state</string>
<string>listbox_usage</string>
......
<?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>default</string>
<string>title</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_parent_state</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>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>default</string> </key>
<value> <string></string> </value>
</item>
<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_viewWebFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>String Field</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: cell.getParentValue().PurchasePackingList_getSimulationStateAsWeb()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
485
\ No newline at end of file
487
\ No newline at end of file
......@@ -77,7 +77,7 @@ class TestVifibComputerNetworkSecurity(TestVifibSlapWebServiceMixin):
def test_ComputerNetworkModuleLocalRoles(self):
module = self.portal.computer_network_module
self.assertSecurityGroup(module, ['R-MEMBER', 'zope'], False)
self.assertSecurityGroup(module, ['R-MEMBER', 'ERP5TypeTestCase'], False)
self.assertRoles(module, 'R-MEMBER', ['Author', 'Auditor'])
self.assertRoles(module, 'zope', ['Owner'])
......
......@@ -68,7 +68,6 @@
<key> <string>portal_type_filter</string> </key>
<value>
<list>
<string>Purchase Packing List Line</string>
<string>Sale Order Line</string>
<string>Sale Packing List Line</string>
</list>
......
472
\ No newline at end of file
473
\ No newline at end of file
......@@ -5,7 +5,7 @@
</chain>
<chain>
<type>Computer</type>
<workflow>computer_slap_interface_workflow, slap_interaction_workflow</workflow>
<workflow>computer_slap_interface_workflow</workflow>
</chain>
<chain>
<type>Computer Partition</type>
......
<?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>packing_list = context.getParentValue()\n
if packing_list.getPortalObject().portal_workflow.isTransitionPossible(packing_list, \'start\'):\n
packing_list.start()\n
if packing_list.getPortalObject().portal_workflow.isTransitionPossible(packing_list, \'stop\'):\n
packing_list.stop()\n
if packing_list.getPortalObject().portal_workflow.isTransitionPossible(packing_list, \'deliver\'):\n
packing_list.deliver()\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PurchasePackingListLine_deliverIfPossible</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<global name="InteractionDefinition" module="Products.ERP5.Interaction"/>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>actbox_category</string> </key>
<value> <string>workflow</string> </value>
</item>
<item>
<key> <string>actbox_name</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>actbox_url</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>activate_script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>after_script_name</string> </key>
<value>
<list>
<string>Computer_reindexRelatedPurchasePackingListLine</string>
</list>
</value>
</item>
<item>
<key> <string>before_commit_script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>guard</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Computer_setAllocationScope</string> </value>
</item>
<item>
<key> <string>method_id</string> </key>
<value>
<list>
<string>_setAllocationScope.*</string>
</list>
</value>
</item>
<item>
<key> <string>once_per_transaction</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>portal_type_filter</string> </key>
<value>
<list>
<string>Computer</string>
</list>
</value>
</item>
<item>
<key> <string>script_name</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>temporary_document_disallowed</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>trigger_type</string> </key>
<value> <int>2</int> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?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>context.portal_catalog.searchAndActivate(\n
portal_type=\'Purchase Packing List Line\',\n
default_aggregate_uid=state_change[\'object\'].getUid(),\n
method_id=\'immediateReindexObject\'\n
)\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>state_change</string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Computer_reindexRelatedPurchasePackingListLine</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
812
\ No newline at end of file
813
\ No newline at end of file
......@@ -2,7 +2,6 @@ Assignment | slap_interaction_workflow
Computer Partition | computer_partition_slap_interface_workflow
Computer Partition | slap_interaction_workflow
Computer | computer_slap_interface_workflow
Computer | slap_interaction_workflow
Hosting Subscription | slap_interaction_workflow
Internal Packing List | slap_interaction_workflow
Open Sale Order | slap_interaction_workflow
......
<?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>"""Map the simulation state to be understand by web user"""\n
state_mapping = {\'cancelled\':"cancelled",\n
\'confirmed\':"pending",\n
\'deleted\':"deleted",\n
\'delivered\':"delivered",\n
\'draft\':"draft",\n
\'ready\':"ready",\n
\'started\':"Install in progress",\n
\'stoped\':"Installed",\n
}\n
return context.Base_translateString(state_mapping[context.getSimulationState()])\n
</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>PurchasePackingList_getSimulationStateAsWeb</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
466
\ No newline at end of file
467
\ No newline at end of file
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