[Erp5-report] r14240 - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_skins/er...
nobody at svn.erp5.org
nobody at svn.erp5.org
Thu Apr 26 02:16:15 CEST 2007
Author: jerome
Date: Thu Apr 26 02:16:14 2007
New Revision: 14240
URL: http://svn.erp5.org?rev=14240&view=rev
Log:
if accounts have a string_index property, use it for sorting in the Trial Balance
Modified:
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountListForTrialBalance.xml
erp5/trunk/bt5/erp5_accounting/bt/revision
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountListForTrialBalance.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountListForTrialBalance.xml?rev=14240&r1=14239&r2=14240&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountListForTrialBalance.xml (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getAccountListForTrialBalance.xml Thu Apr 26 02:16:14 2007
@@ -282,7 +282,8 @@
return node_title_and_id_cache.setdefault(node_relative_url,\n
( node.getUid(),\n
node.getTitle(),\n
- node.Account_getGapId()))\n
+ node.Account_getGapId(),\n
+ node.getProperty(\'string_index\') ))\n
\n
# include all accounts, even those not selected before (no movements in the\n
# period)\n
@@ -517,7 +518,7 @@
line_list = []\n
for (node_relative_url, mirror_section_uid, payment_uid), data in \\\n
line_per_account.items():\n
- node_uid, node_title, node_id = getNodeTitleAndId(node_relative_url)\n
+ node_uid, node_title, node_id, string_index = getNodeTitleAndId(node_relative_url)\n
if mirror_section_uid is not MARKER:\n
if mirror_section_uid is None:\n
node_title = \'%s (%s)\' % ( node_title, N_(\'None\'))\n
@@ -530,6 +531,10 @@
else:\n
payment = getObject(payment_uid)\n
node_title = "%s (%s)" % ( node_title, payment.getTitle() )\n
+ \n
+ if not string_index:\n
+ string_index = \'%-10s\' % node_id\n
+ string_index = \'%s %s\' % (string_index, node_title)\n
\n
initial_debit_balance = data.get(\'initial_debit_balance\', 0)\n
initial_credit_balance = data.get(\'initial_credit_balance\', 0)\n
@@ -547,6 +552,7 @@
line_list.append(Object(uid=\'new_\',\n
node_id=node_id,\n
node_title=node_title,\n
+ string_index=string_index,\n
node_relative_url=node_relative_url,\n
initial_debit_balance=initial_debit_balance,\n
initial_credit_balance=initial_credit_balance,\n
@@ -566,7 +572,7 @@
\n
# sort\n
def getStringIndex(obj):\n
- return \'%-10s %s\' % (obj.node_id, obj.node_title)\n
+ return obj[\'string_index\']\n
line_list.sort(key=getStringIndex)\n
\n
\n
@@ -694,6 +700,7 @@
<string>data</string>
<string>node_title</string>
<string>node_id</string>
+ <string>string_index</string>
<string>None</string>
<string>third_party</string>
<string>payment</string>
Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=14240&r1=14239&r2=14240&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision Thu Apr 26 02:16:14 2007
@@ -1,1 +1,1 @@
-285
+286
More information about the Erp5-report
mailing list