Commit 765bdbdb authored by Łukasz Nowak's avatar Łukasz Nowak

- store and search for software type on source_reference, which is correct...

- store and search for software type on source_reference, which is correct property instead of title
- leave differentiation on title

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@43764 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 95594c0f
...@@ -57,7 +57,6 @@ portal = software_instance.getPortalObject()\n ...@@ -57,7 +57,6 @@ portal = software_instance.getPortalObject()\n
# Get required arguments\n # Get required arguments\n
kwargs = state_change.kwargs\n kwargs = state_change.kwargs\n
software_release_url_string = state_change.kwargs[\'software_release\']\n software_release_url_string = state_change.kwargs[\'software_release\']\n
requested_partition_title = kwargs["software_type"]\n
requested_partition_reference = kwargs["partition_reference"]\n requested_partition_reference = kwargs["partition_reference"]\n
shared = kwargs["shared"]\n shared = kwargs["shared"]\n
software_type = kwargs["software_type"]\n software_type = kwargs["software_type"]\n
...@@ -71,14 +70,14 @@ while (predecessor_software_instance is not None):\n ...@@ -71,14 +70,14 @@ while (predecessor_software_instance is not None):\n
predecessor_software_instance = predecessor_software_instance.getPredecessorRelatedValue(\n predecessor_software_instance = predecessor_software_instance.getPredecessorRelatedValue(\n
portal_type="Software Instance")\n portal_type="Software Instance")\n
\n \n
tag = "%s_%s_%s_inProgress" % (root_software_instance.getUid(), requested_partition_title, \n tag = "%s_%s_%s_inProgress" % (root_software_instance.getUid(), software_type,\n
requested_partition_reference)\n requested_partition_reference)\n
\n \n
# Check if it already exists\n # Check if it already exists\n
request_software_instance = software_instance.portal_catalog.getResultValue(\n request_software_instance = software_instance.portal_catalog.getResultValue(\n
portal_type=\'Software Instance\',\n portal_type=\'Software Instance\',\n
title=requested_partition_title,\n title=requested_partition_reference,\n
source_reference=requested_partition_reference,\n source_reference=software_type,\n
root_uid=root_software_instance.getUid(),\n root_uid=root_software_instance.getUid(),\n
)\n )\n
\n \n
...@@ -93,8 +92,8 @@ if (request_software_instance is None):\n ...@@ -93,8 +92,8 @@ if (request_software_instance is None):\n
module = software_instance.getDefaultModule(portal_type="Software Instance")\n module = software_instance.getDefaultModule(portal_type="Software Instance")\n
request_software_instance = module.newContent(\n request_software_instance = module.newContent(\n
portal_type="Software Instance",\n portal_type="Software Instance",\n
title=requested_partition_title,\n title=requested_partition_reference,\n
source_reference=requested_partition_reference,\n source_reference=software_type,\n
text_content=instance_xml,\n text_content=instance_xml,\n
activate_kw={\'tag\': tag},\n activate_kw={\'tag\': tag},\n
**portal.Base_getNewSoftwareInstanceCoordinate()\n **portal.Base_getNewSoftwareInstanceCoordinate()\n
...@@ -182,7 +181,6 @@ software_instance.edit(\n ...@@ -182,7 +181,6 @@ software_instance.edit(\n
<string>portal</string> <string>portal</string>
<string>kwargs</string> <string>kwargs</string>
<string>software_release_url_string</string> <string>software_release_url_string</string>
<string>requested_partition_title</string>
<string>requested_partition_reference</string> <string>requested_partition_reference</string>
<string>shared</string> <string>shared</string>
<string>software_type</string> <string>software_type</string>
......
205 207
\ No newline at end of file \ 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