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
# Get required arguments\n
kwargs = state_change.kwargs\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
shared = kwargs["shared"]\n
software_type = kwargs["software_type"]\n
......@@ -69,16 +68,16 @@ predecessor_software_instance = software_instance\n
while (predecessor_software_instance is not None):\n
root_software_instance = predecessor_software_instance\n
predecessor_software_instance = predecessor_software_instance.getPredecessorRelatedValue(\n
portal_type="Software Instance")\n
portal_type="Software Instance")\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
\n
# Check if it already exists\n
request_software_instance = software_instance.portal_catalog.getResultValue(\n
portal_type=\'Software Instance\',\n
title=requested_partition_title,\n
source_reference=requested_partition_reference,\n
title=requested_partition_reference,\n
source_reference=software_type,\n
root_uid=root_software_instance.getUid(),\n
)\n
\n
......@@ -93,8 +92,8 @@ if (request_software_instance is None):\n
module = software_instance.getDefaultModule(portal_type="Software Instance")\n
request_software_instance = module.newContent(\n
portal_type="Software Instance",\n
title=requested_partition_title,\n
source_reference=requested_partition_reference,\n
title=requested_partition_reference,\n
source_reference=software_type,\n
text_content=instance_xml,\n
activate_kw={\'tag\': tag},\n
**portal.Base_getNewSoftwareInstanceCoordinate()\n
......@@ -182,7 +181,6 @@ software_instance.edit(\n
<string>portal</string>
<string>kwargs</string>
<string>software_release_url_string</string>
<string>requested_partition_title</string>
<string>requested_partition_reference</string>
<string>shared</string>
<string>software_type</string>
......
205
\ No newline at end of file
207
\ 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