Commit 4775eaac authored by Romain Courteaud's avatar Romain Courteaud

Do not modify existing specialise value.

Prevent accessing ZODB objects by filtering more with MySQL.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@34789 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9498b936
...@@ -54,16 +54,18 @@ ...@@ -54,16 +54,18 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>production_order_line = state_change[\'object\']\n <value> <string>production_order_line = state_change[\'object\']\n
portal = production_order_line.getPortalObject()\n
\n \n
transformation = None\n if not production_order_line.hasSpecialise():\n
resource = production_order_line.getResourceValue()\n portal = production_order_line.getPortalObject()\n
if resource is not None:\n resource = production_order_line.getResourceValue()\n
transformation_list = [q for q in resource.getResourceRelatedValueList(portal_type=portal.getPortalTransformationTypeList()) \\\n if resource is not None:\n
if q.getProperty(\'validation_state\',\'default\') != \'invalidated\']\n transformation_list = portal.portal_catalog(\n
if len(transformation_list) == 1:\n portal_type=portal.getPortalTransformationTypeList(),\n
transformation = transformation_list[0].getRelativeUrl()\n validation_state="!=invalidated",\n
production_order_line.setSpecialise(transformation)\n resource_value=resource)\n
if len(transformation_list) == 1:\n
transformation = transformation_list[0].getRelativeUrl()\n
production_order_line.setSpecialise(transformation)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -105,15 +107,11 @@ production_order_line.setSpecialise(transformation)\n ...@@ -105,15 +107,11 @@ production_order_line.setSpecialise(transformation)\n
<string>production_order_line</string> <string>production_order_line</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>portal</string> <string>portal</string>
<string>None</string>
<string>transformation</string>
<string>resource</string> <string>resource</string>
<string>append</string> <string>None</string>
<string>$append0</string>
<string>_getiter_</string>
<string>q</string>
<string>transformation_list</string> <string>transformation_list</string>
<string>len</string> <string>len</string>
<string>transformation</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
435 438
\ 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