[Erp5-report] r7073 - /erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packi...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu May 4 01:14:55 CEST 2006


Author: jerome
Date: Thu May  4 01:14:51 2006
New Revision: 7073

URL: http://svn.erp5.org?rev=7073&view=rev
Log:
remove useless log messages

Modified:
    erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_workflow/scripts/PackingList_buildInvoice.xml
    erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_workflow/scripts/PackingList_updateAppliedRule.xml

Modified: erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_workflow/scripts/PackingList_buildInvoice.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_workflow/scripts/PackingList_buildInvoice.xml?rev=7073&r1=7072&r2=7073&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_workflow/scripts/PackingList_buildInvoice.xml (original)
+++ erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_workflow/scripts/PackingList_buildInvoice.xml Thu May  4 01:14:51 2006
@@ -66,23 +66,25 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>LOG=lambda msg:context.log("PackingList_buildInvoice", msg)\n
-LOG=lambda msg:\'DISABLED\'\n
+            <value> <string>packing_list = sci[\'object\']\n
+delivery_tool = sci.getPortal().portal_deliveries\n
 \n
-packing_list = sci.object\n
-delivery_tool = sci.getPortal().portal_deliveries\n
-LOG("packing_list : %s"%packing_list.getPath())\n
+found = 0\n
+builder_id_list = [\'sale_invoice_builder\', \'purchase_invoice_builder\']\n
+for builder_id in builder_id_list:\n
+  if hasattr(delivery_tool, builder_id):\n
+    found = 1\n
+    builder = getattr(delivery_tool, builder_id)\n
+    builder.activate(\n
+          after_method_id = [ \'expand\', \n
+                              \'recursiveImmediateReindexObject\',\n
+                              \'immediateReindexObject\' ],\n
+          ).build()\n
 \n
-if hasattr(delivery_tool, \'sale_invoice_builder\') :\n
-  delivery_tool.sale_invoice_builder.activate(\n
-        after_method_id = [ \'expand\', \n
-                            \'recursiveImmediateReindexObject\',\n
-                            \'immediateReindexObject\' ],\n
-        ).build()\n
-else :\n
-  context.log("ERP5 Simulation",\n
+if not found:\n
+  packing_list.log("ERP5 Simulation",\n
               "Unable to build Invoice from packing list at %s "\\\n
-              ": no sale_invoice_builder" % packing_list.getPath())\n
+              ": no builder" % packing_list.getPath())\n
 </string> </value>
         </item>
         <item>
@@ -130,12 +132,17 @@
                         <value>
                           <tuple>
                             <string>sci</string>
-                            <string>LOG</string>
+                            <string>_getitem_</string>
+                            <string>packing_list</string>
                             <string>_getattr_</string>
-                            <string>packing_list</string>
                             <string>delivery_tool</string>
+                            <string>found</string>
+                            <string>builder_id_list</string>
+                            <string>_getiter_</string>
+                            <string>builder_id</string>
                             <string>hasattr</string>
-                            <string>context</string>
+                            <string>getattr</string>
+                            <string>builder</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_workflow/scripts/PackingList_updateAppliedRule.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_workflow/scripts/PackingList_updateAppliedRule.xml?rev=7073&r1=7072&r2=7073&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_workflow/scripts/PackingList_updateAppliedRule.xml (original)
+++ erp5/trunk/bt5/erp5_trade/WorkflowTemplateItem/portal_workflow/packing_list_workflow/scripts/PackingList_updateAppliedRule.xml Thu May  4 01:14:51 2006
@@ -66,11 +66,7 @@
         </item>
         <item>
             <key> <string>_body</string> </key>
-            <value> <string>LOG=lambda msg:context.log("PackingList_updateAppliedRule", msg)\n
-LOG=lambda msg:\'DISABLED\'\n
-\n
-packing_list = state_change.object\n
-\n
+            <value> <string>packing_list = state_change[\'object\']\n
 \n
 activate_kw = {}\n
 related_order = context.getCausalityValue()\n
@@ -137,10 +133,10 @@
                           <tuple>
                             <string>state_change</string>
                             <string>kw</string>
-                            <string>LOG</string>
-                            <string>_getattr_</string>
+                            <string>_getitem_</string>
                             <string>packing_list</string>
                             <string>activate_kw</string>
+                            <string>_getattr_</string>
                             <string>context</string>
                             <string>related_order</string>
                             <string>after_path_list</string>




More information about the Erp5-report mailing list