[Erp5-report] r6713 - /erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_ac...
nobody at svn.erp5.org
nobody at svn.erp5.org
Fri Apr 14 23:19:15 CEST 2006
Author: kevin
Date: Fri Apr 14 23:19:14 2006
New Revision: 6713
URL: http://svn.erp5.org?rev=6713&view=rev
Log:
Remove previous hack by a less intrusive one.
Modified:
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_getAccountingTransactionList.xml
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_getAccountingTransactionList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_getAccountingTransactionList.xml?rev=6713&r1=6712&r2=6713&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_getAccountingTransactionList.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/Entity_getAccountingTransactionList.xml Fri Apr 14 23:19:14 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,22 +93,19 @@
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
- , \'to_date\' : from_date\n
- , \'mirror_section_uid\' : context.getUid()\n
- , \'section_portal_type_list\': [\'Organisation\']\n
+ get_inventory_kw.update({ \'omit_simulation\' : True\n
+ , \'to_date\' : from_date\n
+ , \'mirror_section_uid\': context.getUid()\n
+ , \'where_expression\' : " section.portal_type = \'Organisation\' "\n
})\n
- getInventory = context.getPortalObject()\\\n
- .portal_simulation.getInventoryAssetPrice\n
+ getInventory = context.getPortalObject().portal_simulation.getInventoryAssetPrice\n
# Get previous debit and credit\n
- previous_total_debit = r_(getInventory(omit_output=1,\n
- **get_inventory_kw))\n
- previous_total_credit = r_(getInventory(omit_input =1,\n
- **get_inventory_kw))\n
- if previous_total_credit != 0 :\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
# Show the previous balance if not empty\n
@@ -166,10 +163,11 @@
, parent_reference = l.parent_reference\n
, parent_specific_reference = l.parent_specific_reference\n
, translated_simulation_state_title = o.getTranslatedSimulationStateTitle()\n
- # FIXME: overriding \'portal_type\' in asContext is clearly a bad idea, as many methods are storred on the portal type\n
- # (hence the translated_simulation_state_title hack) -j\xc3\xa9rome\n
+ , account_uid = l.account_uid\n
+ # FIXME: Overriding \'portal_type\' in asContext is clearly a bad idea,\n
+ # as many methods are storred on the portal type (hence the\n
+ # translated_simulation_state_title hack). --jerome\n
, portal_type = l.portal_type\n
- , account_uid = l.account_uid\n
)\n
new_result.append(c)\n
\n
@@ -233,11 +231,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>
@@ -245,7 +245,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