From bcd303280af7ba1b402793efd0b2f017bfa70eae Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?J=C3=A9rome=20Perrin?= <jerome@nexedi.com>
Date: Thu, 20 Mar 2008 16:08:44 +0000
Subject: [PATCH] Support "hide lines with grouping reference" feature in GL

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@20076 20353a03-c40f-0410-a6d1-a30d3c3de9de
---
 ...dule_getGeneralLedgerReportSectionList.xml |   8 +-
 ...ntModule_viewGeneralLedgerReportDialog.xml |   1 +
 .../your_omit_grouping_reference.xml          | 177 ++++++++++++++++++
 bt5/erp5_accounting/bt/revision               |   2 +-
 4 files changed, 182 insertions(+), 6 deletions(-)
 create mode 100644 bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReportDialog/your_omit_grouping_reference.xml

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 42c6e390ab..5b9d38fdb0 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
@@ -94,20 +94,19 @@ currency = portal.Base_getCurrencyForSection(request[\'section_category\'])\n
 precision = portal.account_module.getQuantityPrecisionFromResource(currency)\n
 request.set(\'precision\', precision)\n
 \n
-# TODO\n
-omit_grouping_reference = request.get(\'omit_grouping_reference\', False)\n
-\n
 request.other[\'is_accounting_report\'] = True\n
 \n
 params = dict(at_date=at_date,\n
               precision=precision,\n
               section_uid=section_uid,\n
               simulation_state=simulation_state,\n
-              omit_grouping_reference=omit_grouping_reference,\n
               period_start_date=period_start_date,\n
               movement_portal_type=portal.getPortalAccountingMovementTypeList(),\n
               no_mirror_section_uid_cache=1)\n
 \n
+if request.get(\'omit_grouping_reference\', False):\n
+  params[\'hide_grouping\'] = True\n
+\n
 if from_date:\n
   params[\'from_date\'] = from_date\n
 \n
@@ -334,7 +333,6 @@ return result\n
                             <string>period_start_date</string>
                             <string>currency</string>
                             <string>precision</string>
-                            <string>omit_grouping_reference</string>
                             <string>_write_</string>
                             <string>dict</string>
                             <string>params</string>
diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReportDialog.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReportDialog.xml
index 771b5b8b61..a514c59c32 100644
--- a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReportDialog.xml
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReportDialog.xml
@@ -90,6 +90,7 @@
                         <string>your_section_category</string>
                         <string>your_from_date</string>
                         <string>your_at_date</string>
+                        <string>your_omit_grouping_reference</string>
                         <string>your_portal_skin</string>
                         <string>your_format</string>
                       </list>
diff --git a/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReportDialog/your_omit_grouping_reference.xml b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReportDialog/your_omit_grouping_reference.xml
new file mode 100644
index 0000000000..293b1a56cb
--- /dev/null
+++ b/bt5/erp5_accounting/SkinTemplateItem/portal_skins/erp5_accounting/AccountModule_viewGeneralLedgerReportDialog/your_omit_grouping_reference.xml
@@ -0,0 +1,177 @@
+<?xml version="1.0"?>
+<ZopeData>
+  <record id="1" aka="AAAAAAAAAAE=">
+    <pickle>
+      <tuple>
+        <global name="CheckBoxField" module="Products.Formulator.StandardFields"/>
+        <tuple/>
+      </tuple>
+    </pickle>
+    <pickle>
+      <dictionary>
+        <item>
+            <key> <string>_owner</string> </key>
+            <value>
+              <none/>
+            </value>
+        </item>
+        <item>
+            <key> <string>id</string> </key>
+            <value> <string>your_omit_grouping_reference</string> </value>
+        </item>
+        <item>
+            <key> <string>message_values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>external_validator_failed</string> </key>
+                    <value> <string>The input failed the external validator.</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>overrides</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>css_class</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>tales</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>css_class</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string></string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+        <item>
+            <key> <string>values</string> </key>
+            <value>
+              <dictionary>
+                <item>
+                    <key> <string>alternate_name</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>css_class</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>default</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
+                    <key> <string>description</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>editable</string> </key>
+                    <value> <int>1</int> </value>
+                </item>
+                <item>
+                    <key> <string>enabled</string> </key>
+                    <value> <int>1</int> </value>
+                </item>
+                <item>
+                    <key> <string>external_validator</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>extra</string> </key>
+                    <value> <string></string> </value>
+                </item>
+                <item>
+                    <key> <string>hidden</string> </key>
+                    <value> <int>0</int> </value>
+                </item>
+                <item>
+                    <key> <string>title</string> </key>
+                    <value> <string>Omit Grouped References</string> </value>
+                </item>
+              </dictionary>
+            </value>
+        </item>
+      </dictionary>
+    </pickle>
+  </record>
+</ZopeData>
diff --git a/bt5/erp5_accounting/bt/revision b/bt5/erp5_accounting/bt/revision
index 0905ea78ab..0c1a9b6f06 100644
--- a/bt5/erp5_accounting/bt/revision
+++ b/bt5/erp5_accounting/bt/revision
@@ -1 +1 @@
-642
\ No newline at end of file
+645
\ No newline at end of file
-- 
2.30.9