[Erp5-report] r34336 jerome - /erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins...

nobody at svn.erp5.org nobody at svn.erp5.org
Wed Apr 7 18:41:58 CEST 2010


Author: jerome
Date: Wed Apr  7 18:41:57 2010
New Revision: 34336

URL: http://svn.erp5.org?rev=34336&view=rev
Log:
if we want to make it possible to extend account_type/expense and account_type/income, we have to do it differently, because this report depends on the fact that node_category and node_category_strict_membership are used in the same time, which only takes nodes that are member of boths node_category and node_category_strict_membership.
This repairs GL with GAP filtering

Modified:
    erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerReportSectionList.xml

Modified: erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerReportSectionList.xml
URL: http://svn.erp5.org/erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerReportSectionList.xml?rev=34336&r1=34335&r2=34336&view=diff
==============================================================================
--- erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerReportSectionList.xml [utf8] (original)
+++ erp5/trunk/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerReportSectionList.xml [utf8] Wed Apr  7 18:41:57 2010
@@ -168,9 +168,12 @@
                   \'account_type/equity\',\n
                   \'account_type/liability\',]\n
 \n
-profit_and_loss_account_type = [\n
-                  \'account_type/expense\',\n
-                  \'account_type/income\',]\n
+profit_and_loss_account_type = []\n
+for account_type_value in (cat_tool.account_type.expense,\n
+                     cat_tool.account_type.income):\n
+  profit_and_loss_account_type.extend(\n
+      [category.getRelativeUrl() for category in\n
+        account_type_value.getIndexableChildValueList()])\n
 \n
 account_type_to_group_by_payment = [ \'account_type/asset/cash/bank\' ]\n
 \n
@@ -255,10 +258,9 @@
                                              \'ascending\')]))\n
 \n
 \n
-\n
 # profit & loss -> same, but from date limited to the current period\n
 for inventory in portal.portal_simulation.getInventoryList(\n
-                            node_category=profit_and_loss_account_type,\n
+                            node_category_strict_membership=profit_and_loss_account_type,\n
                             portal_type=portal.getPortalAccountingMovementTypeList(),\n
                             from_date=max(from_date, period_start_date),\n
                             at_date=at_date,\n
@@ -513,11 +515,15 @@
                             <string>getFullAccountName</string>
                             <string>account_type_to_group_by_node</string>
                             <string>profit_and_loss_account_type</string>
+                            <string>_getiter_</string>
+                            <string>account_type_value</string>
+                            <string>append</string>
+                            <string>$append0</string>
+                            <string>category</string>
                             <string>account_type_to_group_by_payment</string>
                             <string>account_type_to_group_by_mirror_section</string>
                             <string>report_section_list</string>
                             <string>existing_section_dict</string>
-                            <string>_getiter_</string>
                             <string>_apply_</string>
                             <string>inventory</string>
                             <string>key</string>




More information about the Erp5-report mailing list