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>
......
......@@ -86,7 +86,7 @@ section_uid = portal.Base_getSectionUidListForSectionCategory(\n
request[\'section_category\'])\n
\n
period_start_date = portal.Base_getAccountingPeriodStartDateForSectionCategory(\n
section_category=request[\'section_category\'], date=from_date or at_date)\n
section_category=request[\'section_category\'], date=from_date or at_date)\n
# for the report summary\n
request.set(\'period_start_date\', period_start_date)\n
\n
......@@ -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>
......
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