From 84483203a4434305286eb22aa2ef694bee0223dd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Fri, 20 Apr 2007 10:00:45 +0000
Subject: [PATCH] Only show "accounting transaction movements" in GL
 ERP5Accounting_getParams now pass portal_type or parent_portal_type

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14137 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 ...ccountModule_getGeneralLedgerReportSectionList.xml |  1 +
 .../erp5_accounting/ERP5Accounting_getParams.xml      | 11 ++++++++---
 bt5/erp5_accounting/bt/revision                       |  2 +-
 3 files changed, 10 insertions(+), 4 deletions(-)

diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerReportSectionList.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerReportSectionList.xml
index ca210c2b02..a42b1d406a 100644
--- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerReportSectionList.xml
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getGeneralLedgerReportSectionList.xml
@@ -100,6 +100,7 @@ params = dict(at_date=at_date,\n
               simulation_state=simulation_state,\n
               omit_grouping_reference=omit_grouping_reference,\n
               period_start_date=period_start_date,\n
+              portal_type=portal.getPortalAccountingMovementTypeList(),\n
               no_mirror_section_uid_cache=1)\n
 \n
 if from_date:\n
diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/ERP5Accounting_getParams.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/ERP5Accounting_getParams.xml
index c42d9af150..a89b45a758 100644
--- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/ERP5Accounting_getParams.xml
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/ERP5Accounting_getParams.xml
@@ -158,9 +158,13 @@ simulation_state = selection_params.get(\'simulation_state\',\n
 if simulation_state:\n
   params[\'simulation_state\'] = simulation_state\n
 \n
-parent_portal_type = selection_params.get(\'parent_portal_type\', None)\n
-if parent_portal_type:\n
-  params[\'parent_portal_type\'] = parent_portal_type\n
+portal_type = selection_params.get(\'portal_type\', None)\n
+if portal_type:\n
+  params[\'portal_type\'] = portal_type\n
+else:\n
+  parent_portal_type = selection_params.get(\'parent_portal_type\', None)\n
+  if parent_portal_type:\n
+    params[\'parent_portal_type\'] = parent_portal_type\n
 \n
 if not ignore_cache:\n
   context.REQUEST.other[\'ERP5Accounting_getParams\'] = params\n
@@ -231,6 +235,7 @@ return dict(params)\n
                             <string>mirror_section_uid</string>
                             <string>payment_uid</string>
                             <string>simulation_state</string>
+                            <string>portal_type</string>
                             <string>parent_portal_type</string>
                           </tuple>
                         </value>
diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision
index ae4d10b425..a9d8b73e69 100644
--- a/bt5/erp5_accounting/bt/revision
+++ b/bt5/erp5_accounting/bt/revision
@@ -1 +1 @@
-256
\ No newline at end of file
+257
\ No newline at end of file
-- 
2.30.9