[Erp5-report] r17422 - in /erp5/trunk/bt5/erp5_mrp: PathTemplateItem/portal_rules/ PortalTy...
nobody at svn.erp5.org
nobody at svn.erp5.org
Tue Nov 6 17:38:14 CET 2007
Author: alex
Date: Tue Nov 6 17:38:14 2007
New Revision: 17422
URL: http://svn.erp5.org?rev=17422&view=rev
Log:
changes to support new style Rules
- added reference, version and test_method_id to rule objects exported as paths
- added group_type_list in rules type definitions
- added rule test scripts in portal_skins
- added rule_validation_workflow to rule workflow chains
Added:
erp5/trunk/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderRule_testContextPortalType.xml
erp5/trunk/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/TransformationRule_test.xml
erp5/trunk/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/TransformationSourcingRule_test.xml
erp5/trunk/bt5/erp5_mrp/bt/template_tool_id_list
Modified:
erp5/trunk/bt5/erp5_mrp/PathTemplateItem/portal_rules/default_production_order_rule.xml
erp5/trunk/bt5/erp5_mrp/PathTemplateItem/portal_rules/default_transformation_rule.xml
erp5/trunk/bt5/erp5_mrp/PathTemplateItem/portal_rules/default_transformation_sourcing_rule.xml
erp5/trunk/bt5/erp5_mrp/PortalTypeTemplateItem/portal_types/Production%20Order%20Rule.xml
erp5/trunk/bt5/erp5_mrp/PortalTypeTemplateItem/portal_types/Transformation%20Rule.xml
erp5/trunk/bt5/erp5_mrp/PortalTypeTemplateItem/portal_types/Transformation%20Sourcing%20Rule.xml
erp5/trunk/bt5/erp5_mrp/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
erp5/trunk/bt5/erp5_mrp/bt/revision
erp5/trunk/bt5/erp5_mrp/bt/template_portal_type_workflow_chain_list
Modified: erp5/trunk/bt5/erp5_mrp/PathTemplateItem/portal_rules/default_production_order_rule.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_mrp/PathTemplateItem/portal_rules/default_production_order_rule.xml?rev=17422&r1=17421&r2=17422&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_mrp/PathTemplateItem/portal_rules/default_production_order_rule.xml (original)
+++ erp5/trunk/bt5/erp5_mrp/PathTemplateItem/portal_rules/default_production_order_rule.xml Tue Nov 6 17:38:14 2007
@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
- <tuple>
- <string>Products.ERP5Type.Document.ProductionOrderRule</string>
- <string>ProductionOrderRule</string>
- </tuple>
- <none/>
+ <global name="ProductionOrderRule" module="Products.ERP5Type.Document.ProductionOrderRule"/>
+ <tuple/>
</tuple>
</pickle>
<pickle>
@@ -43,12 +40,24 @@
</value>
</item>
<item>
+ <key> <string>default_reference</string> </key>
+ <value> <string>default_production_order_rule</string> </value>
+ </item>
+ <item>
<key> <string>id</string> </key>
<value> <string>default_production_order_rule</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Production Order Rule</string> </value>
+ </item>
+ <item>
+ <key> <string>test_method_id</string> </key>
+ <value>
+ <tuple>
+ <string>ProductionOrderRule_testContextPortalType</string>
+ </tuple>
+ </value>
</item>
<item>
<key> <string>title</string> </key>
@@ -60,30 +69,22 @@
<none/>
</value>
</item>
+ <item>
+ <key> <string>version</string> </key>
+ <value> <string>1</string> </value>
+ </item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
- <tuple>
- <tuple>
- <string>BTrees.Length</string>
- <string>Length</string>
- </tuple>
- <none/>
- </tuple>
+ <global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
- <tuple>
- <tuple>
- <string>BTrees.OOBTree</string>
- <string>OOBTree</string>
- </tuple>
- <none/>
- </tuple>
+ <global name="OOBTree" module="BTrees._OOBTree"/>
</pickle>
<pickle>
<none/>
@@ -91,13 +92,7 @@
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
- <tuple>
- <tuple>
- <string>BTrees.OOBTree</string>
- <string>OOBTree</string>
- </tuple>
- <none/>
- </tuple>
+ <global name="OOBTree" module="BTrees._OOBTree"/>
</pickle>
<pickle>
<none/>
Modified: erp5/trunk/bt5/erp5_mrp/PathTemplateItem/portal_rules/default_transformation_rule.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_mrp/PathTemplateItem/portal_rules/default_transformation_rule.xml?rev=17422&r1=17421&r2=17422&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_mrp/PathTemplateItem/portal_rules/default_transformation_rule.xml (original)
+++ erp5/trunk/bt5/erp5_mrp/PathTemplateItem/portal_rules/default_transformation_rule.xml Tue Nov 6 17:38:14 2007
@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
- <tuple>
- <string>Products.ERP5Type.Document.TransformationRule</string>
- <string>TransformationRule</string>
- </tuple>
- <none/>
+ <global name="TransformationRule" module="Products.ERP5Type.Document.TransformationRule"/>
+ <tuple/>
</tuple>
</pickle>
<pickle>
@@ -43,12 +40,24 @@
</value>
</item>
<item>
+ <key> <string>default_reference</string> </key>
+ <value> <string>default_transformation_rule</string> </value>
+ </item>
+ <item>
<key> <string>id</string> </key>
<value> <string>default_transformation_rule</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Transformation Rule</string> </value>
+ </item>
+ <item>
+ <key> <string>test_method_id</string> </key>
+ <value>
+ <tuple>
+ <string>TransformationRule_test</string>
+ </tuple>
+ </value>
</item>
<item>
<key> <string>title</string> </key>
@@ -60,30 +69,22 @@
<none/>
</value>
</item>
+ <item>
+ <key> <string>version</string> </key>
+ <value> <string>1</string> </value>
+ </item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
- <tuple>
- <tuple>
- <string>BTrees.Length</string>
- <string>Length</string>
- </tuple>
- <none/>
- </tuple>
+ <global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
- <tuple>
- <tuple>
- <string>BTrees.OOBTree</string>
- <string>OOBTree</string>
- </tuple>
- <none/>
- </tuple>
+ <global name="OOBTree" module="BTrees._OOBTree"/>
</pickle>
<pickle>
<none/>
@@ -91,13 +92,7 @@
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
- <tuple>
- <tuple>
- <string>BTrees.OOBTree</string>
- <string>OOBTree</string>
- </tuple>
- <none/>
- </tuple>
+ <global name="OOBTree" module="BTrees._OOBTree"/>
</pickle>
<pickle>
<none/>
Modified: erp5/trunk/bt5/erp5_mrp/PathTemplateItem/portal_rules/default_transformation_sourcing_rule.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_mrp/PathTemplateItem/portal_rules/default_transformation_sourcing_rule.xml?rev=17422&r1=17421&r2=17422&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_mrp/PathTemplateItem/portal_rules/default_transformation_sourcing_rule.xml (original)
+++ erp5/trunk/bt5/erp5_mrp/PathTemplateItem/portal_rules/default_transformation_sourcing_rule.xml Tue Nov 6 17:38:14 2007
@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
- <tuple>
- <string>Products.ERP5Type.Document.TransformationSourcingRule</string>
- <string>TransformationSourcingRule</string>
- </tuple>
- <none/>
+ <global name="TransformationSourcingRule" module="Products.ERP5Type.Document.TransformationSourcingRule"/>
+ <tuple/>
</tuple>
</pickle>
<pickle>
@@ -43,12 +40,24 @@
</value>
</item>
<item>
+ <key> <string>default_reference</string> </key>
+ <value> <string>default_transformation_sourcing_rule</string> </value>
+ </item>
+ <item>
<key> <string>id</string> </key>
<value> <string>default_transformation_sourcing_rule</string> </value>
</item>
<item>
<key> <string>portal_type</string> </key>
<value> <string>Transformation Sourcing Rule</string> </value>
+ </item>
+ <item>
+ <key> <string>test_method_id</string> </key>
+ <value>
+ <tuple>
+ <string>TransformationSourcingRule_test</string>
+ </tuple>
+ </value>
</item>
<item>
<key> <string>title</string> </key>
@@ -60,30 +69,22 @@
<none/>
</value>
</item>
+ <item>
+ <key> <string>version</string> </key>
+ <value> <string>1</string> </value>
+ </item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
- <tuple>
- <tuple>
- <string>BTrees.Length</string>
- <string>Length</string>
- </tuple>
- <none/>
- </tuple>
+ <global name="Length" module="BTrees.Length"/>
</pickle>
<pickle> <int>0</int> </pickle>
</record>
<record id="3" aka="AAAAAAAAAAM=">
<pickle>
- <tuple>
- <tuple>
- <string>BTrees.OOBTree</string>
- <string>OOBTree</string>
- </tuple>
- <none/>
- </tuple>
+ <global name="OOBTree" module="BTrees._OOBTree"/>
</pickle>
<pickle>
<none/>
@@ -91,13 +92,7 @@
</record>
<record id="4" aka="AAAAAAAAAAQ=">
<pickle>
- <tuple>
- <tuple>
- <string>BTrees.OOBTree</string>
- <string>OOBTree</string>
- </tuple>
- <none/>
- </tuple>
+ <global name="OOBTree" module="BTrees._OOBTree"/>
</pickle>
<pickle>
<none/>
Modified: erp5/trunk/bt5/erp5_mrp/PortalTypeTemplateItem/portal_types/Production%20Order%20Rule.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_mrp/PortalTypeTemplateItem/portal_types/Production%2520Order%2520Rule.xml?rev=17422&r1=17421&r2=17422&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_mrp/PortalTypeTemplateItem/portal_types/Production%20Order%20Rule.xml (original)
+++ erp5/trunk/bt5/erp5_mrp/PortalTypeTemplateItem/portal_types/Production%20Order%20Rule.xml Tue Nov 6 17:38:14 2007
@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
- <tuple>
- <string>Products.ERP5Type.ERP5Type</string>
- <string>ERP5TypeInformation</string>
- </tuple>
- <none/>
+ <global name="ERP5TypeInformation" module="Products.ERP5Type.ERP5Type"/>
+ <tuple/>
</tuple>
</pickle>
<pickle>
@@ -83,7 +80,9 @@
<item>
<key> <string>group_list</string> </key>
<value>
- <tuple/>
+ <tuple>
+ <string>rule</string>
+ </tuple>
</value>
</item>
<item>
@@ -105,6 +104,10 @@
<value> <string></string> </value>
</item>
<item>
+ <key> <string>permission</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
<key> <string>product</string> </key>
<value> <string>ERP5Type</string> </value>
</item>
Modified: erp5/trunk/bt5/erp5_mrp/PortalTypeTemplateItem/portal_types/Transformation%20Rule.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_mrp/PortalTypeTemplateItem/portal_types/Transformation%2520Rule.xml?rev=17422&r1=17421&r2=17422&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_mrp/PortalTypeTemplateItem/portal_types/Transformation%20Rule.xml (original)
+++ erp5/trunk/bt5/erp5_mrp/PortalTypeTemplateItem/portal_types/Transformation%20Rule.xml Tue Nov 6 17:38:14 2007
@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
- <tuple>
- <string>Products.ERP5Type.ERP5Type</string>
- <string>ERP5TypeInformation</string>
- </tuple>
- <none/>
+ <global name="ERP5TypeInformation" module="Products.ERP5Type.ERP5Type"/>
+ <tuple/>
</tuple>
</pickle>
<pickle>
@@ -91,7 +88,9 @@
<item>
<key> <string>group_list</string> </key>
<value>
- <tuple/>
+ <tuple>
+ <string>rule</string>
+ </tuple>
</value>
</item>
<item>
@@ -109,6 +108,10 @@
<value> <string></string> </value>
</item>
<item>
+ <key> <string>permission</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
<key> <string>property_sheet_list</string> </key>
<value>
<tuple/>
Modified: erp5/trunk/bt5/erp5_mrp/PortalTypeTemplateItem/portal_types/Transformation%20Sourcing%20Rule.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_mrp/PortalTypeTemplateItem/portal_types/Transformation%2520Sourcing%2520Rule.xml?rev=17422&r1=17421&r2=17422&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_mrp/PortalTypeTemplateItem/portal_types/Transformation%20Sourcing%20Rule.xml (original)
+++ erp5/trunk/bt5/erp5_mrp/PortalTypeTemplateItem/portal_types/Transformation%20Sourcing%20Rule.xml Tue Nov 6 17:38:14 2007
@@ -3,11 +3,8 @@
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
- <tuple>
- <string>Products.ERP5Type.ERP5Type</string>
- <string>ERP5TypeInformation</string>
- </tuple>
- <none/>
+ <global name="ERP5TypeInformation" module="Products.ERP5Type.ERP5Type"/>
+ <tuple/>
</tuple>
</pickle>
<pickle>
@@ -83,7 +80,9 @@
<item>
<key> <string>group_list</string> </key>
<value>
- <tuple/>
+ <tuple>
+ <string>rule</string>
+ </tuple>
</value>
</item>
<item>
@@ -101,6 +100,10 @@
<value> <string></string> </value>
</item>
<item>
+ <key> <string>permission</string> </key>
+ <value> <string></string> </value>
+ </item>
+ <item>
<key> <string>property_sheet_list</string> </key>
<value>
<tuple/>
Modified: erp5/trunk/bt5/erp5_mrp/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_mrp/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml?rev=17422&r1=17421&r2=17422&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_mrp/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml (original)
+++ erp5/trunk/bt5/erp5_mrp/PortalTypeWorkflowChainTemplateItem/workflow_chain_type.xml Tue Nov 6 17:38:14 2007
@@ -13,7 +13,7 @@
</chain>
<chain>
<type>Production Order Rule</type>
- <workflow>edit_workflow</workflow>
+ <workflow>edit_workflow, rule_validation_workflow</workflow>
</chain>
<chain>
<type>Production Packing List</type>
@@ -29,7 +29,7 @@
</chain>
<chain>
<type>Production Report</type>
- <workflow>production_packing_list_causality_workflow, delivery_simulation_interaction_workflow, production_packing_list_workflow, edit_workflow, delivery_causality_interaction_workflow</workflow>
+ <workflow>production_packing_list_causality_workflow, delivery_simulation_interaction_workflow, delivery_causality_interaction_workflow, production_packing_list_workflow, edit_workflow</workflow>
</chain>
<chain>
<type>Production Report Cell</type>
@@ -53,10 +53,10 @@
</chain>
<chain>
<type>Transformation Rule</type>
- <workflow>edit_workflow</workflow>
+ <workflow>edit_workflow, rule_validation_workflow</workflow>
</chain>
<chain>
<type>Transformation Sourcing Rule</type>
- <workflow>edit_workflow</workflow>
+ <workflow>rule_validation_workflow, edit_workflow</workflow>
</chain>
</workflow_chain>
Added: erp5/trunk/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderRule_testContextPortalType.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderRule_testContextPortalType.xml?rev=17422&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderRule_testContextPortalType.xml (added)
+++ erp5/trunk/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/ProductionOrderRule_testContextPortalType.xml Tue Nov 6 17:38:14 2007
@@ -1,0 +1,147 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>Python_magic</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>Script_magic</string> </key>
+ <value> <int>3</int> </value>
+ </item>
+ <item>
+ <key> <string>__ac_local_roles__</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_bind_names</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>_asgns</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>name_container</string> </key>
+ <value> <string>container</string> </value>
+ </item>
+ <item>
+ <key> <string>name_context</string> </key>
+ <value> <string>context</string> </value>
+ </item>
+ <item>
+ <key> <string>name_m_self</string> </key>
+ <value> <string>script</string> </value>
+ </item>
+ <item>
+ <key> <string>name_subpath</string> </key>
+ <value> <string>traverse_subpath</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>_body</string> </key>
+ <value> <string>return context.getPortalType() in [\'Production Order\']\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_filepath</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_owner</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string>rule</string> </value>
+ </item>
+ <item>
+ <key> <string>errors</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_code</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>co_argcount</string> </key>
+ <value> <int>1</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>rule</string>
+ <string>_getattr_</string>
+ <string>context</string>
+ </tuple>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_defaults</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>ProductionOrderRule_testContextPortalType</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/TransformationRule_test.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/TransformationRule_test.xml?rev=17422&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/TransformationRule_test.xml (added)
+++ erp5/trunk/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/TransformationRule_test.xml Tue Nov 6 17:38:14 2007
@@ -1,0 +1,199 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>Python_magic</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>Script_magic</string> </key>
+ <value> <int>3</int> </value>
+ </item>
+ <item>
+ <key> <string>__ac_local_roles__</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_bind_names</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>_asgns</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>name_container</string> </key>
+ <value> <string>container</string> </value>
+ </item>
+ <item>
+ <key> <string>name_context</string> </key>
+ <value> <string>context</string> </value>
+ </item>
+ <item>
+ <key> <string>name_m_self</string> </key>
+ <value> <string>script</string> </value>
+ </item>
+ <item>
+ <key> <string>name_subpath</string> </key>
+ <value> <string>traverse_subpath</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>_body</string> </key>
+ <value> <string encoding="cdata"><![CDATA[
+
+# Test if we must transform\n
+# The test should actually be based on nodes, paths\n
+# and capacities, which is not possible now\n
+\n
+movement = context\n
+\n
+try:\n
+ root_applied_rule = movement.getRootAppliedRule()\n
+except AttributeError:\n
+ return False\n
+root_rule = root_applied_rule.getSpecialiseValue()\n
+order = root_applied_rule.getCausalityValue()\n
+root_movement = movement.getRootSimulationMovement()\n
+\n
+# Test movement\n
+if (root_rule is None or\n
+ root_rule.getPortalType() != "Production Order Rule" or\n
+ order is None or\n
+ movement.getResourceValue() is None or\n
+ movement.getSourceValue() is None or\n
+ movement.getResourceValue() != root_movement.getResourceValue()):\n
+ return False\n
+\n
+supply_chain = rule.getSupplyChain(movement.getParentValue())\n
+parent_supply_link = rule.getCurrentSupplyLink(movement)\n
+current_tranfo_link_list = supply_chain.getPreviousProductionSupplyLinkList(parent_supply_link)\n
+length = len(current_tranfo_link_list)\n
+if length == 0:\n
+ return False\n
+elif length > 1:\n
+ # XXX FIXME: implementation needed\n
+ raise TransformationRuleError,\\\n
+ "TransformationRule not able to use multiple SupplyLink."\n
+return True\n
+
+
+]]></string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_filepath</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_owner</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string>rule</string> </value>
+ </item>
+ <item>
+ <key> <string>errors</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_code</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>co_argcount</string> </key>
+ <value> <int>1</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>rule</string>
+ <string>context</string>
+ <string>movement</string>
+ <string>_getattr_</string>
+ <string>root_applied_rule</string>
+ <string>AttributeError</string>
+ <string>False</string>
+ <string>root_rule</string>
+ <string>order</string>
+ <string>root_movement</string>
+ <string>None</string>
+ <string>supply_chain</string>
+ <string>parent_supply_link</string>
+ <string>current_tranfo_link_list</string>
+ <string>len</string>
+ <string>length</string>
+ <string>TransformationRuleError</string>
+ <string>True</string>
+ </tuple>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_defaults</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>TransformationRule_test</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Added: erp5/trunk/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/TransformationSourcingRule_test.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/TransformationSourcingRule_test.xml?rev=17422&view=auto
==============================================================================
--- erp5/trunk/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/TransformationSourcingRule_test.xml (added)
+++ erp5/trunk/bt5/erp5_mrp/SkinTemplateItem/portal_skins/erp5_mrp/TransformationSourcingRule_test.xml Tue Nov 6 17:38:14 2007
@@ -1,0 +1,182 @@
+<?xml version="1.0"?>
+<ZopeData>
+ <record id="1" aka="AAAAAAAAAAE=">
+ <pickle>
+ <tuple>
+ <global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
+ <tuple/>
+ </tuple>
+ </pickle>
+ <pickle>
+ <dictionary>
+ <item>
+ <key> <string>Python_magic</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>Script_magic</string> </key>
+ <value> <int>3</int> </value>
+ </item>
+ <item>
+ <key> <string>__ac_local_roles__</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_bind_names</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>_asgns</string> </key>
+ <value>
+ <dictionary>
+ <item>
+ <key> <string>name_container</string> </key>
+ <value> <string>container</string> </value>
+ </item>
+ <item>
+ <key> <string>name_context</string> </key>
+ <value> <string>context</string> </value>
+ </item>
+ <item>
+ <key> <string>name_m_self</string> </key>
+ <value> <string>script</string> </value>
+ </item>
+ <item>
+ <key> <string>name_subpath</string> </key>
+ <value> <string>traverse_subpath</string> </value>
+ </item>
+ </dictionary>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>_body</string> </key>
+ <value> <string># Test if we must transform\n
+# The test should actually be based on nodes, paths\n
+# and capacities, which is not possible now\n
+\n
+movement = context\n
+\n
+try:\n
+ root_applied_rule = movement.getRootAppliedRule()\n
+except AttributeError:\n
+ return False\n
+root_rule = root_applied_rule.getSpecialiseValue()\n
+order = root_applied_rule.getCausalityValue()\n
+\n
+# Test movement\n
+if (root_rule is None or\n
+ root_rule.getPortalType() != "Production Order Rule" or\n
+ order is None or\n
+ movement.getResourceValue() is None or\n
+ movement.getSourceValue() is None):\n
+ return False\n
+\n
+supply_chain = rule.getSupplyChain(movement.getParentValue())\n
+parent_supply_link = rule.getCurrentSupplyLink(movement)\n
+if not supply_chain.test(parent_supply_link, movement):\n
+ return False\n
+return True\n
+</string> </value>
+ </item>
+ <item>
+ <key> <string>_code</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_filepath</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_owner</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>_params</string> </key>
+ <value> <string>rule</string> </value>
+ </item>
+ <item>
+ <key> <string>errors</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_code</string> </key>
+ <value>
+ <object>
+ <klass>
+ <global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
+ </klass>
+ <tuple/>
+ <state>
+ <dictionary>
+ <item>
+ <key> <string>co_argcount</string> </key>
+ <value> <int>1</int> </value>
+ </item>
+ <item>
+ <key> <string>co_varnames</string> </key>
+ <value>
+ <tuple>
+ <string>rule</string>
+ <string>context</string>
+ <string>movement</string>
+ <string>_getattr_</string>
+ <string>root_applied_rule</string>
+ <string>AttributeError</string>
+ <string>False</string>
+ <string>root_rule</string>
+ <string>order</string>
+ <string>None</string>
+ <string>supply_chain</string>
+ <string>parent_supply_link</string>
+ <string>True</string>
+ </tuple>
+ </value>
+ </item>
+ </dictionary>
+ </state>
+ </object>
+ </value>
+ </item>
+ <item>
+ <key> <string>func_defaults</string> </key>
+ <value>
+ <none/>
+ </value>
+ </item>
+ <item>
+ <key> <string>id</string> </key>
+ <value> <string>TransformationSourcingRule_test</string> </value>
+ </item>
+ <item>
+ <key> <string>warnings</string> </key>
+ <value>
+ <tuple/>
+ </value>
+ </item>
+ </dictionary>
+ </pickle>
+ </record>
+</ZopeData>
Modified: erp5/trunk/bt5/erp5_mrp/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_mrp/bt/revision?rev=17422&r1=17421&r2=17422&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_mrp/bt/revision (original)
+++ erp5/trunk/bt5/erp5_mrp/bt/revision Tue Nov 6 17:38:14 2007
@@ -1,1 +1,1 @@
-47
+49
Modified: erp5/trunk/bt5/erp5_mrp/bt/template_portal_type_workflow_chain_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_mrp/bt/template_portal_type_workflow_chain_list?rev=17422&r1=17421&r2=17422&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_mrp/bt/template_portal_type_workflow_chain_list (original)
+++ erp5/trunk/bt5/erp5_mrp/bt/template_portal_type_workflow_chain_list Tue Nov 6 17:38:14 2007
@@ -4,6 +4,7 @@
Production Order Line | order_movement_simulation_interaction_workflow
Production Order Line | production_matrix_workflow
Production Order Rule | edit_workflow
+Production Order Rule | rule_validation_workflow
Production Order | edit_workflow
Production Order | order_simulation_interaction_workflow
Production Order | production_order_workflow
@@ -33,4 +34,6 @@
Supply Link | edit_workflow
Supply Node | edit_workflow
Transformation Rule | edit_workflow
-Transformation Sourcing Rule | edit_workflow
+Transformation Rule | rule_validation_workflow
+Transformation Sourcing Rule | edit_workflow
+Transformation Sourcing Rule | rule_validation_workflow
Added: erp5/trunk/bt5/erp5_mrp/bt/template_tool_id_list
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_mrp/bt/template_tool_id_list?rev=17422&view=auto
==============================================================================
(empty)
More information about the Erp5-report
mailing list