[Erp5-report] r13285 - in /erp5/trunk/bt5/erp5_accounting_l10n_fr_m9: SkinTemplateItem/port...

nobody at svn.erp5.org nobody at svn.erp5.org
Thu Mar 8 13:01:46 CET 2007


Author: jerome
Date: Thu Mar  8 13:01:42 2007
New Revision: 13285

URL: http://svn.erp5.org?rev=13285&view=rev
Log:
Sort lines as int_index then third party title on Transfer_getPaymentTransactionList
For int_index, use int_index on the payment transaction, or on this transaction's causality if not set on the payment transaction


Modified:
    erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/Transfer_getPaymentTransactionList.xml
    erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/Transfer_viewTransferReportSection/listbox_causality_int_index.xml
    erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/bt/revision

Modified: erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/Transfer_getPaymentTransactionList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/Transfer_getPaymentTransactionList.xml?rev=13285&r1=13284&r2=13285&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/Transfer_getPaymentTransactionList.xml (original)
+++ erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/Transfer_getPaymentTransactionList.xml Thu Mar  8 13:01:42 2007
@@ -70,13 +70,21 @@
             <key> <string>_body</string> </key>
             <value> <string>numordre_cache = dict()\n
 def getNumordre(tr):\n
-  \'\'\'calculate numordre and cache it.\n
+  \'\'\'calculate a sort key and cache it.\n
   \'\'\'\n
   try:\n
     return numordre_cache[tr]\n
   except KeyError:\n
+    sort_key = (tr.getIntIndex(),\n
+                tr.getSourceSectionTitle())\n
+    if not sort_key[0]:\n
+      causality = tr.getCausalityValue()\n
+      if causality is not None:\n
+        sort_key = (causality.getIntIndex(),\n
+                    causality.getSourceSectionTitle())\n
     return numordre_cache.setdefault(tr, tr.getProperty(\'noordre\',\n
-                                            tr.getSourceReference()))\n
+                                                sort_key))\n
+\n
 \n
 def transfer_comparator(a, b):\n
   \'\'\'Compare 2 accounting transactions.\n
@@ -90,11 +98,11 @@
   transaction_list.sort(transfer_comparator)\n
   return transaction_list\n
 \n
-from Products.ERP5Type.Cache import CachingMethod\n
-no_getPaymentTransactionList = CachingMethod(\n
-                               getPaymentTransactionList,\n
-                               id=\'%s%s\' % (script.getId(),\n
-                                            context.getId()))\n
+# from Products.ERP5Type.Cache import CachingMethod\n
+# getPaymentTransactionList = CachingMethod(\n
+#                               getPaymentTransactionList,\n
+#                               id=\'%s%s\' % (script.getId(),\n
+#                                            context.getId()))\n
 \n
 \n
 return getPaymentTransactionList()\n
@@ -152,12 +160,6 @@
                             <string>getNumordre</string>
                             <string>transfer_comparator</string>
                             <string>getPaymentTransactionList</string>
-                            <string>Products.ERP5Type.Cache</string>
-                            <string>CachingMethod</string>
-                            <string>_getattr_</string>
-                            <string>script</string>
-                            <string>context</string>
-                            <string>no_getPaymentTransactionList</string>
                           </tuple>
                         </value>
                     </item>

Modified: erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/Transfer_viewTransferReportSection/listbox_causality_int_index.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/Transfer_viewTransferReportSection/listbox_causality_int_index.xml?rev=13285&r1=13284&r2=13285&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/Transfer_viewTransferReportSection/listbox_causality_int_index.xml (original)
+++ erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/Transfer_viewTransferReportSection/listbox_causality_int_index.xml Thu Mar  8 13:01:42 2007
@@ -279,7 +279,7 @@
       <dictionary>
         <item>
             <key> <string>_text</string> </key>
-            <value> <string>python: \'%05d\' % cell.getCausalityValue().getIntIndex()</string> </value>
+            <value> <string>python: \'%05d\' % (cell.getIntIndex() or cell.getCausalityValue().getIntIndex())</string> </value>
         </item>
       </dictionary>
     </pickle>

Modified: erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/bt/revision?rev=13285&r1=13284&r2=13285&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/bt/revision (original)
+++ erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/bt/revision Thu Mar  8 13:01:42 2007
@@ -1,1 +1,1 @@
-85
+86




More information about the Erp5-report mailing list