[Erp5-report] r34940 jerome - in /erp5/trunk/bt5/erp5_accounting: SkinTemplateItem/portal_s...

nobody at svn.erp5.org nobody at svn.erp5.org
Mon May 3 15:16:29 CEST 2010


Author: jerome
Date: Mon May  3 15:16:29 2010
New Revision: 34940

URL: http://svn.erp5.org?rev=34940&view=rev
Log:
add more columns to accounting line export

Modified:
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAccountingLineReportLineList.xml
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingLineReportReportSection/listbox.xml
    erp5/trunk/bt5/erp5_accounting/bt/revision

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAccountingLineReportLineList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAccountingLineReportLineList.xml?rev=34940&r1=34939&r2=34940&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAccountingLineReportLineList.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_getAccountingLineReportLineList.xml [utf8] Mon May  3 15:16:29 2010
@@ -95,6 +95,25 @@
     return document.getTitle()\n
   return \'\'\n
 \n
+bank_account_title_cache = dict()\n
+def getBankAccountTitle(bank_account):\n
+  try:\n
+    return bank_account_title_cache[bank_account]\n
+  except KeyError:\n
+    pass\n
+\n
+  if bank_account is not None:\n
+    reference = bank_account.getReference()\n
+    title = bank_account.getTitle()\n
+    if reference and reference != title:\n
+      value = "%s - %s" % (reference, title)\n
+    else:\n
+      value = title\n
+  else:\n
+    value = \'\'\n
+  bank_account_title_cache[bank_account] = value\n
+  return value\n
+\n
 accounting_currency_reference_cache = dict()\n
 def getAccountingCurrencyReference(section_relative_url):\n
   try:\n
@@ -126,9 +145,13 @@
         node_reference=getAccountReference(movement.getSource(portal_type=\'Account\')),\n
         node_title=movement.getSourceTitle(),\n
         section_title=movement.getSourceSectionTitle(),\n
+        payment_title=getBankAccountTitle(movement.getSourcePaymentValue()),\n
+        payment_mode=movement.getPaymentModeTranslatedTitle(),\n
         mirror_section_title=movement.getDestinationSectionTitle(),\n
+        mirror_payment_title=getBankAccountTitle(movement.getDestinationPaymentValue()),\n
         function_title=getTitle(movement.getSourceFunctionValue()),\n
         project_title=getTitle(movement.getSourceProjectValue()),\n
+        product_line=movement.getProductLineTranslatedTitle(),\n
         date=movement.getStartDate(),\n
         debit=movement.getSourceInventoriatedTotalAssetDebit(),\n
         credit=movement.getSourceInventoriatedTotalAssetCredit(),\n
@@ -140,6 +163,7 @@
         translated_portal_type=movement.getTranslatedPortalType(),\n
         parent_translated_portal_type=delivery.getTranslatedPortalType(),\n
         translated_simulation_state_title=movement.getTranslatedSimulationStateTitle(),))\n
+\n
     if delivery.portal_type == \'Internal Invoice Transaction\' or not is_source:\n
       line_list.append(Object(\n
         title=movement.hasTitle() and movement.getTitle() or\n
@@ -150,9 +174,13 @@
         node_reference=getAccountReference(movement.getDestination(portal_type=\'Account\')),\n
         node_title=movement.getDestinationTitle(),\n
         section_title=movement.getDestinationSectionTitle(),\n
+        payment_title=getBankAccountTitle(movement.getDestinationPaymentValue()),\n
+        payment_mode=movement.getPaymentModeTranslatedTitle(),\n
         mirror_section_title=movement.getSourceSectionTitle(),\n
+        mirror_payment_title=getBankAccountTitle(movement.getSourcePaymentValue()),\n
         function_title=getTitle(movement.getDestinationFunctionValue()),\n
         project_title=getTitle(movement.getDestinationProjectValue()),\n
+        product_line=movement.getProductLineTranslatedTitle(),\n
         date=movement.getStopDate(),\n
         debit=movement.getDestinationInventoriatedTotalAssetDebit(),\n
         credit=movement.getDestinationInventoriatedTotalAssetCredit(),\n
@@ -226,6 +254,8 @@
                             <string>account_reference_cache</string>
                             <string>getAccountReference</string>
                             <string>getTitle</string>
+                            <string>bank_account_title_cache</string>
+                            <string>getBankAccountTitle</string>
                             <string>accounting_currency_reference_cache</string>
                             <string>getAccountingCurrencyReference</string>
                             <string>portal_type</string>

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingLineReportReportSection/listbox.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingLineReportReportSection/listbox.xml?rev=34940&r1=34939&r2=34940&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingLineReportReportSection/listbox.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountingTransactionModule_viewAccountingLineReportReportSection/listbox.xml [utf8] Mon May  3 15:16:29 2010
@@ -111,16 +111,32 @@
                           <string>Section</string>
                         </tuple>
                         <tuple>
+                          <string>payment_title</string>
+                          <string>Section Bank Account</string>
+                        </tuple>
+                        <tuple>
+                          <string>payment_mode</string>
+                          <string>Payment Mode</string>
+                        </tuple>
+                        <tuple>
                           <string>mirror_section_title</string>
                           <string>Third Party</string>
                         </tuple>
                         <tuple>
+                          <string>mirror_payment_title</string>
+                          <string>Third Party Bank Account</string>
+                        </tuple>
+                        <tuple>
                           <string>function_title</string>
                           <string>Function</string>
                         </tuple>
                         <tuple>
                           <string>project_title</string>
                           <string>Project</string>
+                        </tuple>
+                        <tuple>
+                          <string>product_line</string>
+                          <string>Product Line</string>
                         </tuple>
                         <tuple>
                           <string>date</string>

Modified: erp5/trunk/bt5/erp5_accounting/bt/revision
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/bt/revision?rev=34940&r1=34939&r2=34940&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/bt/revision [utf8] Mon May  3 15:16:29 2010
@@ -1,1 +1,1 @@
-1198
+1199




More information about the Erp5-report mailing list