[Erp5-report] r6710 - /erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_ac...

nobody at svn.erp5.org nobody at svn.erp5.org
Fri Apr 14 23:17:39 CEST 2006


Author: kevin
Date: Fri Apr 14 23:17:37 2006
New Revision: 6710

URL: http://svn.erp5.org?rev=6710&view=rev
Log:
Remove previous hack by a less intrusive one.

Modified:
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/BankAccount_getAccountingTransactionList.xml

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/BankAccount_getAccountingTransactionList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/BankAccount_getAccountingTransactionList.xml?rev=6710&r1=6709&r2=6710&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/BankAccount_getAccountingTransactionList.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/BankAccount_getAccountingTransactionList.xml Fri Apr 14 23:17:37 2006
@@ -81,7 +81,7 @@
 # Build the common inventory dict\n
 params = {}\n
 \n
-if kw.get(\'no_from_date\', 0): from_date = None\n
+if kw.get(\'no_from_date\', False): from_date = None\n
 \n
 if simulation_state: params[\'simulation_state\'] = simulation_state\n
 if section_category: params[\'section_category\'] = section_category\n
@@ -93,20 +93,20 @@
 new_result  = []\n
 net_balance = 0.0\n
 \n
-if from_date is not None :\n
+if from_date is not None:\n
   # Create a new parameter list to get the previous balance\n
   get_inventory_kw = params.copy()\n
-  get_inventory_kw.update({ \'omit_simulation\'         : 1\n
-                          , \'payment_uid\'             : context.getUid()\n
-                          , \'to_date\'                 : from_date\n
-                          , \'section_portal_type_list\': [\'Organisation\']\n
-                          , \'stat\'                    : 1\n
+  get_inventory_kw.update({ \'omit_simulation\' : True\n
+                          , \'payment_uid\'     : context.getUid()\n
+                          , \'to_date\'         : from_date\n
+                          , \'where_expression\': " section.portal_type = \'Organisation\' "\n
+                          , \'stat\'            : True\n
                           })\n
 \n
   getInventory = context.getPortalObject().portal_simulation.getInventory\n
   # Get previous debit and credit\n
-  previous_total_debit  = r_(getInventory(omit_output=1, **get_inventory_kw))\n
-  previous_total_credit = r_(getInventory(omit_input =1, **get_inventory_kw))\n
+  previous_total_debit  = r_(getInventory(omit_output=True, **get_inventory_kw))\n
+  previous_total_credit = r_(getInventory(omit_input =True, **get_inventory_kw))\n
   if previous_total_credit != 0:\n
     previous_total_credit = - previous_total_credit\n
 \n
@@ -228,11 +228,13 @@
                             <string>from_date</string>
                             <string>at_date</string>
                             <string>params</string>
+                            <string>False</string>
                             <string>None</string>
                             <string>_write_</string>
                             <string>new_result</string>
                             <string>net_balance</string>
                             <string>get_inventory_kw</string>
+                            <string>True</string>
                             <string>getInventory</string>
                             <string>_apply_</string>
                             <string>previous_total_debit</string>
@@ -240,7 +242,6 @@
                             <string>Products.ERP5Type.Document</string>
                             <string>newTempAccountingTransaction</string>
                             <string>previous_balance</string>
-                            <string>True</string>
                             <string>result</string>
                             <string>_getiter_</string>
                             <string>l</string>




More information about the Erp5-report mailing list