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 ...@@ -88,6 +88,9 @@ inventory_params = dict(section_uid=section_uid,\n
simulation_state=simulation_state,\n simulation_state=simulation_state,\n
precision=precision,\n precision=precision,\n
group_by_resource=0)\n group_by_resource=0)\n
if node_uid:\n
inventory_params[\'node_uid\'] = node_uid\n
\n
MARKER = Object()\n MARKER = Object()\n
\n \n
# a dictionary (node_relative_url, mirror_section_uid, payment_uid)\n # a dictionary (node_relative_url, mirror_section_uid, payment_uid)\n
...@@ -602,7 +605,7 @@ return line_list\n ...@@ -602,7 +605,7 @@ return line_list\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <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>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -622,7 +625,7 @@ return line_list\n ...@@ -622,7 +625,7 @@ return line_list\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>8</int> </value> <value> <int>9</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
...@@ -636,6 +639,7 @@ return line_list\n ...@@ -636,6 +639,7 @@ return line_list\n
<string>section_uid</string> <string>section_uid</string>
<string>simulation_state</string> <string>simulation_state</string>
<string>precision</string> <string>precision</string>
<string>node_uid</string>
<string>kw</string> <string>kw</string>
<string>Products.PythonScripts.standard</string> <string>Products.PythonScripts.standard</string>
<string>Object</string> <string>Object</string>
...@@ -657,6 +661,7 @@ return line_list\n ...@@ -657,6 +661,7 @@ return line_list\n
<string>accounting_movement_type_list</string> <string>accounting_movement_type_list</string>
<string>dict</string> <string>dict</string>
<string>inventory_params</string> <string>inventory_params</string>
<string>_write_</string>
<string>MARKER</string> <string>MARKER</string>
<string>line_per_account</string> <string>line_per_account</string>
<string>account_used</string> <string>account_used</string>
...@@ -672,7 +677,6 @@ return line_list\n ...@@ -672,7 +677,6 @@ return line_list\n
<string>total_final_balance_if_credit</string> <string>total_final_balance_if_credit</string>
<string>_apply_</string> <string>_apply_</string>
<string>node</string> <string>node</string>
<string>_write_</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>account_props</string> <string>account_props</string>
<string>round</string> <string>round</string>
...@@ -688,7 +692,6 @@ return line_list\n ...@@ -688,7 +692,6 @@ return line_list\n
<string>mirror_section_uid</string> <string>mirror_section_uid</string>
<string>payment_uid</string> <string>payment_uid</string>
<string>data</string> <string>data</string>
<string>node_uid</string>
<string>node_title</string> <string>node_title</string>
<string>node_id</string> <string>node_id</string>
<string>None</string> <string>None</string>
......
...@@ -86,7 +86,7 @@ section_uid = portal.Base_getSectionUidListForSectionCategory(\n ...@@ -86,7 +86,7 @@ section_uid = portal.Base_getSectionUidListForSectionCategory(\n
request[\'section_category\'])\n request[\'section_category\'])\n
\n \n
period_start_date = portal.Base_getAccountingPeriodStartDateForSectionCategory(\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 # for the report summary\n
request.set(\'period_start_date\', period_start_date)\n request.set(\'period_start_date\', period_start_date)\n
\n \n
...@@ -98,6 +98,15 @@ currency = portal.Base_getCurrencyForSection(request[\'section_category\'])\n ...@@ -98,6 +98,15 @@ currency = portal.Base_getCurrencyForSection(request[\'section_category\'])\n
precision = portal.account_module.getQuantityPrecisionFromResource(currency)\n precision = portal.account_module.getQuantityPrecisionFromResource(currency)\n
request.set(\'precision\', precision)\n request.set(\'precision\', precision)\n
\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 request.set(\'is_accounting_report\', True)\n
\n \n
# flat_mode is a boolean that indicate wether we should use a report tree or a\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 ...@@ -118,7 +127,8 @@ return [ ReportSection(\n
period_start_date.earliestTime(),\n period_start_date.earliestTime(),\n
section_uid=section_uid,\n section_uid=section_uid,\n
simulation_state=simulation_state,\n simulation_state=simulation_state,\n
precision=precision ),) ]\n precision=precision,\n
node_uid=node_uid), )]\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -186,6 +196,13 @@ return [ ReportSection(\n ...@@ -186,6 +196,13 @@ return [ ReportSection(\n
<string>period_start_date</string> <string>period_start_date</string>
<string>currency</string> <string>currency</string>
<string>precision</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>True</string>
<string>dict</string> <string>dict</string>
</tuple> </tuple>
......
...@@ -80,7 +80,9 @@ ...@@ -80,7 +80,9 @@
<item> <item>
<key> <string>center</string> </key> <key> <string>center</string> </key>
<value> <value>
<list/> <list>
<string>your_gap</string>
</list>
</value> </value>
</item> </item>
<item> <item>
......
279 281
\ No newline at end of file \ 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