Commit 0252f8e4 authored by Jérome Perrin's avatar Jérome Perrin

Test Trial Balance can filter displayed accounts by GAP category

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@14195 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7df14fd3
......@@ -88,6 +88,9 @@ inventory_params = dict(section_uid=section_uid,\n
simulation_state=simulation_state,\n
precision=precision,\n
group_by_resource=0)\n
if node_uid:\n
inventory_params[\'node_uid\'] = node_uid\n
\n
MARKER = Object()\n
\n
# a dictionary (node_relative_url, mirror_section_uid, payment_uid)\n
......@@ -602,7 +605,7 @@ return line_list\n
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>show_empty_accounts, expand_accounts, at_date, from_date, period_start_date, section_uid, simulation_state, precision, **kw</string> </value>
<value> <string>show_empty_accounts, expand_accounts, at_date, from_date, period_start_date, section_uid, simulation_state, precision, node_uid, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -622,7 +625,7 @@ return line_list\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>8</int> </value>
<value> <int>9</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
......@@ -636,6 +639,7 @@ return line_list\n
<string>section_uid</string>
<string>simulation_state</string>
<string>precision</string>
<string>node_uid</string>
<string>kw</string>
<string>Products.PythonScripts.standard</string>
<string>Object</string>
......@@ -657,6 +661,7 @@ return line_list\n
<string>accounting_movement_type_list</string>
<string>dict</string>
<string>inventory_params</string>
<string>_write_</string>
<string>MARKER</string>
<string>line_per_account</string>
<string>account_used</string>
......@@ -672,7 +677,6 @@ return line_list\n
<string>total_final_balance_if_credit</string>
<string>_apply_</string>
<string>node</string>
<string>_write_</string>
<string>_getitem_</string>
<string>account_props</string>
<string>round</string>
......@@ -688,7 +692,6 @@ return line_list\n
<string>mirror_section_uid</string>
<string>payment_uid</string>
<string>data</string>
<string>node_uid</string>
<string>node_title</string>
<string>node_id</string>
<string>None</string>
......
......@@ -98,6 +98,15 @@ currency = portal.Base_getCurrencyForSection(request[\'section_category\'])\n
precision = portal.account_module.getQuantityPrecisionFromResource(currency)\n
request.set(\'precision\', precision)\n
\n
\n
# optional GAP filter\n
node_uid = []\n
gap = request.get(\'gap\', None)\n
if gap:\n
gap_value = portal.portal_categories.gap.restrictedTraverse(gap)\n
node_uid = [x.uid for x in gap_value.getCategoryMemberValueList(\n
portal_type=\'Account\')]\n
\n
request.set(\'is_accounting_report\', True)\n
\n
# flat_mode is a boolean that indicate wether we should use a report tree or a\n
......@@ -118,7 +127,8 @@ return [ ReportSection(\n
period_start_date.earliestTime(),\n
section_uid=section_uid,\n
simulation_state=simulation_state,\n
precision=precision ),) ]\n
precision=precision,\n
node_uid=node_uid), )]\n
</string> </value>
</item>
<item>
......@@ -186,6 +196,13 @@ return [ ReportSection(\n
<string>period_start_date</string>
<string>currency</string>
<string>precision</string>
<string>node_uid</string>
<string>gap</string>
<string>gap_value</string>
<string>append</string>
<string>$append0</string>
<string>_getiter_</string>
<string>x</string>
<string>True</string>
<string>dict</string>
</tuple>
......
......@@ -80,7 +80,9 @@
<item>
<key> <string>center</string> </key>
<value>
<list/>
<list>
<string>your_gap</string>
</list>
</value>
</item>
<item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.StandardFields</string>
<string>ListField</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>your_gap</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>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>unknown_selection</string> </key>
<value> <string>You selected an item that was not in the list.</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>extra_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>first_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</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>extra_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>first_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</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> <string></string> </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>extra_item</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>first_item</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>hidden</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>items</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>size</string> </key>
<value> <int>1</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>GAP</string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.TALESField</string>
<string>TALESMethod</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: here.Account_getGapItemList()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
279
\ No newline at end of file
281
\ No newline at end of file
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment