[Erp5-report] r33329 kazuhiko - in /erp5/trunk/products/ERP5/bootstrap/erp5_core: WorkflowT...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Mar 3 15:25:05 CET 2010


Author: kazuhiko
Date: Wed Mar  3 15:25:03 2010
New Revision: 33329

URL: http://svn.erp5.org?rev=33329&view=rev
Log:
do not hardcode filter portal types, but check if updateMatrix() exists or not.

Modified:
    erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions/Rule_deleteContent_updateMatrix.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions/Rule_installation_updateMatrix.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/scripts/Predicate_updateMatrix.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/scripts/Rule_updateMatrix.xml
    erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions/Rule_deleteContent_updateMatrix.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions/Rule_deleteContent_updateMatrix.xml?rev=33329&r1=33328&r2=33329&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions/Rule_deleteContent_updateMatrix.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions/Rule_deleteContent_updateMatrix.xml [utf8] Wed Mar  3 15:25:03 2010
@@ -36,6 +36,12 @@
             </value>
         </item>
         <item>
+            <key> <string>before_commit_script_name</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
             <key> <string>description</string> </key>
             <value> <string></string> </value>
         </item>
@@ -59,12 +65,13 @@
             </value>
         </item>
         <item>
+            <key> <string>once_per_transaction</string> </key>
+            <value> <int>0</int> </value>
+        </item>
+        <item>
             <key> <string>portal_type_filter</string> </key>
             <value>
-              <list>
-                <string>Invoice Transaction Rule</string>
-                <string>Payment Rule</string>
-              </list>
+              <none/>
             </value>
         </item>
         <item>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions/Rule_installation_updateMatrix.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions/Rule_installation_updateMatrix.xml?rev=33329&r1=33328&r2=33329&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions/Rule_installation_updateMatrix.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/interactions/Rule_installation_updateMatrix.xml [utf8] Wed Mar  3 15:25:03 2010
@@ -36,6 +36,12 @@
             </value>
         </item>
         <item>
+            <key> <string>before_commit_script_name</string> </key>
+            <value>
+              <tuple/>
+            </value>
+        </item>
+        <item>
             <key> <string>description</string> </key>
             <value> <string></string> </value>
         </item>
@@ -58,11 +64,13 @@
             </value>
         </item>
         <item>
+            <key> <string>once_per_transaction</string> </key>
+            <value> <int>0</int> </value>
+        </item>
+        <item>
             <key> <string>portal_type_filter</string> </key>
             <value>
-              <list>
-                <string>Invoice Transaction Rule</string>
-              </list>
+              <none/>
             </value>
         </item>
         <item>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/scripts/Predicate_updateMatrix.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/scripts/Predicate_updateMatrix.xml?rev=33329&r1=33328&r2=33329&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/scripts/Predicate_updateMatrix.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/scripts/Predicate_updateMatrix.xml [utf8] Wed Mar  3 15:25:03 2010
@@ -54,8 +54,7 @@
         <item>
             <key> <string>_body</string> </key>
             <value> <string>rule = state_change[\'object\'].getParentValue()\n
-\n
-if rule.getPortalType() in (\'Invoice Transaction Rule\', \'Payment Rule\') :\n
+if getattr(rule, \'updateMatrix\', None) is not None:\n
   rule.activate(\n
     after_path_and_method_id=([rule.getPath(),],\n
         [\'immediateReindexObject\', \'recursiveImmediateReindexObject\'])\n
@@ -100,6 +99,8 @@
                             <string>_getattr_</string>
                             <string>_getitem_</string>
                             <string>rule</string>
+                            <string>getattr</string>
+                            <string>None</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/scripts/Rule_updateMatrix.xml
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/scripts/Rule_updateMatrix.xml?rev=33329&r1=33328&r2=33329&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/scripts/Rule_updateMatrix.xml [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/WorkflowTemplateItem/portal_workflow/rule_interaction_workflow/scripts/Rule_updateMatrix.xml [utf8] Wed Mar  3 15:25:03 2010
@@ -54,7 +54,8 @@
         <item>
             <key> <string>_body</string> </key>
             <value> <string>matrix = state_change[\'object\']\n
-matrix.activate(\n
+if getattr(matrix, \'updateMatrix\', None) is not None:\n
+  matrix.activate(\n
     after_path_and_method_id=([matrix.getPath(),],\n
         [\'immediateReindexObject\', \'recursiveImmediateReindexObject\'])\n
     ).updateMatrix()\n
@@ -97,6 +98,8 @@
                             <string>state_change</string>
                             <string>_getitem_</string>
                             <string>matrix</string>
+                            <string>getattr</string>
+                            <string>None</string>
                             <string>_getattr_</string>
                           </tuple>
                         </value>

Modified: erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision
URL: http://svn.erp5.org/erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision?rev=33329&r1=33328&r2=33329&view=diff
==============================================================================
--- erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] (original)
+++ erp5/trunk/products/ERP5/bootstrap/erp5_core/bt/revision [utf8] Wed Mar  3 15:25:03 2010
@@ -1,1 +1,1 @@
-1499
+1500




More information about the Erp5-report mailing list