[Erp5-report] r34466 jerome - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_s...
nobody at svn.erp5.org
nobody at svn.erp5.org
Mon Apr 12 15:34:13 CEST 2010
Author: jerome
Date: Mon Apr 12 15:34:08 2010
New Revision: 34466
URL: http://svn.erp5.org?rev=34466&view=rev
Log:
sort lines properly
Modified:
erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getAccountingTransactionLineList.xml
erp5/trunk/bt5/erp5_accounting/bt/revision
Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getAccountingTransactionLineList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getAccountingTransactionLineList.xml?rev=34466&r1=34465&r2=34466&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getAccountingTransactionLineList.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransaction_getAccountingTransactionLineList.xml [utf8] Mon Apr 12 15:34:08 2010
@@ -53,21 +53,19 @@
</item>
<item>
<key> <string>_body</string> </key>
- <value> <string>sort_dict = { \'income\': \'\\0\\0\',\n
- \'expense\': \'\\0\\0\',\n
- \'receivable\': \'\\0\\2\',\n
- \'payable\': \'\\0\\2\',\n
- \'collected_vat\': \'\\0\\1\',\n
- \'refundable_vat\': \'\\0\\1\' }\n
+ <value> <string>sort_dict = { \'income\': 0,\n
+ \'expense\': -2,\n
+ \'receivable\': -2,\n
+ \'payable\': 0,\n
+ \'collected_vat\': -1,\n
+ \'refundable_vat\': -1 }\n
\n
-def sortInvoiceTransactionLine(a, b):\n
- a_id = sort_dict.get(a.getId(), a.getId())\n
- b_id = sort_dict.get(b.getId(), b.getId())\n
- return cmp(a_id, b_id)\n
+def sortInvoiceTransactionLine(a):\n
+ return sort_dict.get(a.getId(), a.getIntId())\n
\n
object_list = list(context.contentValues(\n
filter={\'portal_type\': portal_type}))\n
-object_list.sort(sortInvoiceTransactionLine)\n
+object_list.sort(key=sortInvoiceTransactionLine)\n
return object_list\n
</string> </value>
</item>
Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=34466&r1=34465&r2=34466&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] Mon Apr 12 15:34:08 2010
@@ -1,1 +1,1 @@
-1161
+1162
More information about the Erp5-report
mailing list