[Erp5-report] r34789 romain - in /erp5/trunk/bt5/erp5_mrp: WorkflowTemplateItem/portal_work...
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Apr 26 17:35:43 CEST 2010
Author: romain
Date: Mon Apr 26 17:35:41 2010
New Revision: 34789
URL: http://svn.erp5.org?rev=34789&view=rev
Log:
Do not modify existing specialise value.
Prevent accessing ZODB objects by filtering more with MySQL.
Modified:
erp5/trunk/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/production_order_interaction_workflow/scripts/ProductionOrderLine_setTransformationFromResource.xml
erp5/trunk/bt5/erp5_mrp/bt/revision
Modified: erp5/trunk/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/production_order_interaction_workflow/scripts/ProductionOrderLine_setTransformationFromResource.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/production_order_interaction_workflow/scripts/ProductionOrderLine_setTransformationFromResource.xml?rev=34789&r1=34788&r2=34789&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/production_order_interaction_workflow/scripts/ProductionOrderLine_setTransformationFromResource.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_mrp/WorkflowTemplateItem/portal_workflow/production_order_interaction_workflow/scripts/ProductionOrderLine_setTransformationFromResource.xml [utf8] Mon Apr 26 17:35:41 2010
@@ -54,16 +54,18 @@
<item>
<key> <string>_body</string> </key>
<value> <string>production_order_line = state_change[\'object\']\n
-portal = production_order_line.getPortalObject()\n
\n
-transformation = None\n
-resource = production_order_line.getResourceValue()\n
-if resource is not None:\n
- transformation_list = [q for q in resource.getResourceRelatedValueList(portal_type=portal.getPortalTransformationTypeList()) \\\n
- if q.getProperty(\'validation_state\',\'default\') != \'invalidated\']\n
- if len(transformation_list) == 1:\n
- transformation = transformation_list[0].getRelativeUrl()\n
-production_order_line.setSpecialise(transformation)\n
+if not production_order_line.hasSpecialise():\n
+ portal = production_order_line.getPortalObject()\n
+ resource = production_order_line.getResourceValue()\n
+ if resource is not None:\n
+ transformation_list = portal.portal_catalog(\n
+ portal_type=portal.getPortalTransformationTypeList(),\n
+ validation_state="!=invalidated",\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>
</item>
<item>
@@ -105,15 +107,11 @@
<string>production_order_line</string>
<string>_getattr_</string>
<string>portal</string>
+ <string>resource</string>
<string>None</string>
- <string>transformation</string>
- <string>resource</string>
- <string>append</string>
- <string>$append0</string>
- <string>_getiter_</string>
- <string>q</string>
<string>transformation_list</string>
<string>len</string>
+ <string>transformation</string>
</tuple>
</value>
</item>
Modified: erp5/trunk/bt5/erp5_mrp/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_mrp/bt/revision?rev=34789&r1=34788&r2=34789&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_mrp/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_mrp/bt/revision [utf8] Mon Apr 26 17:35:41 2010
@@ -1,1 +1,1 @@
-435
+438
More information about the Erp5-report
mailing list