From 66653937da06739fc42e120006a429bf5e21ea9b Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Wed, 4 Oct 2006 11:56:40 +0000
Subject: [PATCH] fix Other Parties report with new
 Entity_viewAccountingTransactionList column names

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10525 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 ...odule_getOtherPartiesReportSectionList.xml | 26 +++++++++----------
 .../AccountModule_viewOtherPartiesReport.xml  |  9 +++++++
 2 files changed, 22 insertions(+), 13 deletions(-)

diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getOtherPartiesReportSectionList.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getOtherPartiesReportSectionList.xml
index e975f4e121..eb931dff23 100644
--- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getOtherPartiesReportSectionList.xml
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_getOtherPartiesReportSectionList.xml
@@ -97,7 +97,7 @@ params =  {\n
   , \'section_category\'            : transaction_section_category\n
   , \'simulation_state\'            : transaction_simulation_state\n
   , \'report_depth\'                : 5\n
-  , \'where_expression\'            : " section.portal_type = \'Organisation\' "\n
+  #, \'where_expression\'            : " section.portal_type = \'Organisation\' "\n
 }\n
 \n
 params[\'hide_grouping\'] = request[\'omit_grouped_references\']\n
@@ -111,15 +111,15 @@ simulation_tool = portal.portal_simulation\n
 \n
 entity_columns = [\n
                        (\'date\', \'Date\'),\n
-                       (\'parent_portal_type\', \'Type\'),\n
-                       (\'Entity_getAccountingTransactionGapId\', \'GAP\'),\n
-                       (\'parent_reference\', \'Invoice No\'),\n
-                       (\'parent_title\', \'Title\'),\n
-                       (\'parent_specific_reference\', \'Reference\'),\n
-                       (\'translated_simulation_state_title\', \'State\'),\n
-                       (\'debit\', \'Debit\'),\n
-                       (\'credit\', \'Credit\'),\n
-                       (\'net_balance\', \'Balance\'),\n
+                       (\'Movement_getExplanationTranslatedPortalType\', \'Type\'),\n
+                       (\'Movement_getNodeGapId\', \'GAP\'),\n
+                       (\'Movement_getExplanationReference\', \'Invoice No\'),\n
+                       (\'Movement_getExplanationTitle\', \'Title\'),\n
+                       (\'Movement_getSpecificReference\', \'Reference\'),\n
+                       (\'getTranslatedSimulationStateTitle\', \'State\'),\n
+                       (\'Movement_getDebitPrice\', \'Debit\'),\n
+                       (\'Movement_getCreditPrice\', \'Credit\'),\n
+                       (\'running_total_price\', \'Balance\'),\n
 ]\n
 \n
 # build a list of all accounts which _strictly_ belongs to categories \n
@@ -166,11 +166,11 @@ for party in context.Account_zDistinctSectionList():\n
                                level=1,\n
                                path=o.getPhysicalPath(),\n
                                form_id=\'Entity_viewAccountingTransactionList\',\n
-                               selection_name = \'accounting_selection\',\n
+                               selection_name = \'other_parties_report_selection\',\n
                                selection_params = params,\n
                                selection_columns = entity_columns,\n
-                               selection_sort_order=[(\'delivery.stop_date\',\n
-                                                      \'ascending\')], ) )\n
+                               selection_sort_order=[(\'stock.date\', \'ascending\'),\n
+                                                      (\'stock.uid\', \'ascending\'),],))\n
 \n
 return result\n
 
diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewOtherPartiesReport.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewOtherPartiesReport.xml
index 35fbfefbaf..033b9f0ef5 100644
--- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewOtherPartiesReport.xml
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewOtherPartiesReport.xml
@@ -76,6 +76,15 @@
                         <string>transaction_section_category</string>
                         <string>transaction_simulation_state</string>
                         <string>at_date</string>
+                        <string>my_entity_role</string>
+                        <string>my_from_date</string>
+                        <string>my_node_category</string>
+                        <string>my_omit_balanced_accounts</string>
+                        <string>my_omit_empty_accounts</string>
+                        <string>my_omit_grouped_references</string>
+                        <string>my_to_date</string>
+                        <string>my_transaction_section_category</string>
+                        <string>my_transaction_simulation_state</string>
                       </list>
                     </value>
                 </item>
-- 
2.30.9