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

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Dec 20 11:48:44 CET 2006


Author: jerome
Date: Wed Dec 20 11:48:42 2006
New Revision: 11773

URL: http://svn.erp5.org?rev=11773&view=rev
Log:
add account_id and account_title as "more column" to make this listbox
reusable.


Modified:
    erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/AccountingTransactionModule_getPerOriginAndSheetSummaryLineList.xml
    erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/AccountingTransactionModule_viewPerOriginAndSheetSummary/listbox.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/AccountingTransactionModule_getPerOriginAndSheetSummaryLineList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/AccountingTransactionModule_getPerOriginAndSheetSummaryLineList.xml?rev=11773&r1=11772&r2=11773&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/AccountingTransactionModule_getPerOriginAndSheetSummaryLineList.xml (original)
+++ erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/AccountingTransactionModule_getPerOriginAndSheetSummaryLineList.xml Wed Dec 20 11:48:42 2006
@@ -84,18 +84,21 @@
   items = values.items()\n
   items.sort()\n
   for (sheet, account_url), total_price in items:\n
-    account_title = portal.restrictedTraverse(account_url\n
-                                  ).Account_getFormattedTitle()\n
-    debit = max(total_price, 0)\n
+    account = portal.restrictedTraverse(account_url)\n
+\n
+    # XXX assume a precision of 2 places, because we use EUR for M9\n
+    debit = round(max(total_price, 0), 2)\n
     total_debit += debit\n
-    credit = -min(total_price, 0)\n
+    credit = round(-min(total_price, 0), 2)\n
     total_credit += credit\n
     line_list.append(Object(uid=\'new_\',\n
                             origin=origin,\n
                             sheet=sheet,\n
+                            account_id=account.getId(),\n
+                            account_title=account.getTitle(),\n
+                            account=account.Account_getFormattedTitle(),\n
                             debit=debit,\n
-                            credit=credit,\n
-                            account=account_title))\n
+                            credit=credit))\n
 \n
 cache_storage[\'m9_report_per_origin_and_sheet_summary_total_debit\'] = total_debit\n
 cache_storage[\'m9_report_per_origin_and_sheet_summary_total_credit\'] = total_credit\n
@@ -162,7 +165,8 @@
                             <string>sheet</string>
                             <string>account_url</string>
                             <string>total_price</string>
-                            <string>account_title</string>
+                            <string>account</string>
+                            <string>round</string>
                             <string>max</string>
                             <string>debit</string>
                             <string>min</string>

Modified: erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/AccountingTransactionModule_viewPerOriginAndSheetSummary/listbox.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/AccountingTransactionModule_viewPerOriginAndSheetSummary/listbox.xml?rev=11773&r1=11772&r2=11773&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/AccountingTransactionModule_viewPerOriginAndSheetSummary/listbox.xml (original)
+++ erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/SkinTemplateItem/portal_skins/erp5_accounting_l10n_fr_m9/AccountingTransactionModule_viewPerOriginAndSheetSummary/listbox.xml Wed Dec 20 11:48:42 2006
@@ -312,7 +312,16 @@
                 <item>
                     <key> <string>all_columns</string> </key>
                     <value>
-                      <list/>
+                      <list>
+                        <tuple>
+                          <string>account_id</string>
+                          <string>Account ID</string>
+                        </tuple>
+                        <tuple>
+                          <string>account_title</string>
+                          <string>Account Name</string>
+                        </tuple>
+                      </list>
                     </value>
                 </item>
                 <item>

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=11773&r1=11772&r2=11773&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/bt/revision (original)
+++ erp5/trunk/bt5/erp5_accounting_l10n_fr_m9/bt/revision Wed Dec 20 11:48:42 2006
@@ -1,1 +1,1 @@
-61
+63




More information about the Erp5-report mailing list