Commit 5dc76a57 authored by Łukasz Nowak's avatar Łukasz Nowak

Fix logic of comparision and edition.

instance.getRootSoftwareReleaseUrl returns URL of software release, but ERP5
works on documents.
parent 252e20ad
...@@ -121,8 +121,10 @@ if (partition is None):\n ...@@ -121,8 +121,10 @@ if (partition is None):\n
else:\n else:\n
# Update the software release if it has been changed before allocation\n # Update the software release if it has been changed before allocation\n
sale_order_line = delivery.contentValues(portal_type=sale_order_line_portal_type)[0]\n sale_order_line = delivery.contentValues(portal_type=sale_order_line_portal_type)[0]\n
if sale_order_line.getAggregate(portal_type=\'Software Release\') != instance.getRootSoftwareReleaseUrl():\n if sale_order_line.getAggregateValue(portal_type=\'Software Release\').getUrlString() != instance.getRootSoftwareReleaseUrl():\n
aggregate_list = [instance.getRootSoftwareReleaseUrl(), \n software_release = portal.portal_catalog.getResultValue(portal_type=\'Software Release\',\n
url_string=instance.getRootSoftwareReleaseUrl())\n
aggregate_list = [software_release.getRelativeUrl(), \n
instance.getRelativeUrl(),\n instance.getRelativeUrl(),\n
hosting_subscription.getRelativeUrl()]\n hosting_subscription.getRelativeUrl()]\n
sale_order_line.edit(aggregate_list=aggregate_list)\n sale_order_line.edit(aggregate_list=aggregate_list)\n
......
13 14
\ 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