[Erp5-report] r7168 - /erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed May 10 22:24:51 CEST 2006


Author: aurel
Date: Wed May 10 22:24:47 2006
New Revision: 7168

URL: http://svn.erp5.org?rev=7168&view=rev
Log:
add parameter to pass check of baobab source on line

Modified:
    erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashDelivery_checkCounterInventory.xml

Modified: erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashDelivery_checkCounterInventory.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashDelivery_checkCounterInventory.xml?rev=7168&r1=7167&r2=7168&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashDelivery_checkCounterInventory.xml (original)
+++ erp5/trunk/bt5/erp5_banking_core/SkinTemplateItem/portal_skins/erp5_banking_core/CashDelivery_checkCounterInventory.xml Wed May 10 22:24:47 2006
@@ -81,19 +81,20 @@
 \n
 # test all movement\n
 tmp_list = context.contentValues(filter={\'portal_type\': portal_type})\n
-context.log(\'tmp_list\', str((tmp_list, portal_type, context)))\n
+#context.log(\'tmp_list\', str((tmp_list, portal_type, context)))\n
+#context.log(\'source\',source)\n
 line_list = []\n
 for l in tmp_list :\n
   # The source can be different for every line (due to getBaobabSource approach)\n
   source_counter = source or l.getBaobabSource()\n
   # test if resource is a currency_cash\n
-  try:    \n
+  try:\n
     if (l.getResourceValue().getPortalType() in currency_cash_portal_type_list) \\\n
-           and (l.getBaobabSource() == source_counter) :\n
+           and (same_source or l.getBaobabSource() == source_counter) :\n
       line_list.append(l)\n
-  except (AttributeError, KeyError):    \n
+  except (AttributeError, KeyError):\n
     pass\n
-\n
+#context.log("line list", line_list)\n
 if len(line_list) == 0 :\n
   # no resource\n
   return 2\n
@@ -105,11 +106,11 @@
   if line.hasCellContent() :\n
     for cell in line.objectValues() :\n
       variation_text = cell.getVariationText()\n
-      #context.log(\'check cell : \', str((source_counter, line_resource, variation_text)))\n
+ #     context.log(\'check cell : \', str((source_counter, line_resource, variation_text)))\n
       inventory_value = context.portal_simulation.getFutureInventory(node=source_counter, resource = line_resource,\n
           variation_text = variation_text)\n
-      #context.log(\'cell quantity\', cell.getQuantity())\n
-      #context.log(\'inventory value\', inventory_value)\n
+  #    context.log(\'cell quantity\', cell.getQuantity())\n
+  #    context.log(\'inventory value\', inventory_value)\n
       if inventory_value - cell.getQuantity() < 0:\n
         return 1\n
 \n
@@ -147,7 +148,7 @@
         </item>
         <item>
             <key> <string>_params</string> </key>
-            <value> <string>source=None,  portal_type=None, debug=0</string> </value>
+            <value> <string>source=None,  portal_type=None, same_source=0, debug=0</string> </value>
         </item>
         <item>
             <key> <string>errors</string> </key>
@@ -167,7 +168,7 @@
                   <dictionary>
                     <item>
                         <key> <string>co_argcount</string> </key>
-                        <value> <int>3</int> </value>
+                        <value> <int>4</int> </value>
                     </item>
                     <item>
                         <key> <string>co_varnames</string> </key>
@@ -175,6 +176,7 @@
                           <tuple>
                             <string>source</string>
                             <string>portal_type</string>
+                            <string>same_source</string>
                             <string>debug</string>
                             <string>currency_cash_portal_type_list</string>
                             <string>inventory_dict</string>
@@ -182,7 +184,6 @@
                             <string>_getattr_</string>
                             <string>context</string>
                             <string>tmp_list</string>
-                            <string>str</string>
                             <string>line_list</string>
                             <string>_getiter_</string>
                             <string>l</string>
@@ -210,6 +211,7 @@
                 <none/>
                 <none/>
                 <int>0</int>
+                <int>0</int>
               </tuple>
             </value>
         </item>




More information about the Erp5-report mailing list