Commit 2a4e74ba authored by Jérome Perrin's avatar Jérome Perrin

Add a new option on Account Statement Report to print detail of not grouped...

Add a new option on Account Statement Report to print detail of not grouped lines in the beginning balance.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@15024 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 3fa6d2e6
...@@ -76,8 +76,10 @@ Account is the combination of :\n ...@@ -76,8 +76,10 @@ Account is the combination of :\n
"""\n """\n
\n \n
from Products.ERP5Form.Report import ReportSection\n from Products.ERP5Form.Report import ReportSection\n
from Products.ERP5Type.Message import Message\n
request = context.REQUEST\n request = context.REQUEST\n
traverse = context.getPortalObject().restrictedTraverse\n traverse = context.getPortalObject().restrictedTraverse\n
N_ = lambda msg: Message(\'ui\', msg)\n
\n \n
# for preference info fields on Account_viewAccountingTransactionList\n # for preference info fields on Account_viewAccountingTransactionList\n
request.set(\'is_accounting_report\', True)\n request.set(\'is_accounting_report\', True)\n
...@@ -92,6 +94,7 @@ mirror_section = request.get(\'mirror_section\', None)\n ...@@ -92,6 +94,7 @@ mirror_section = request.get(\'mirror_section\', None)\n
payment = request.get(\'payment\', None)\n payment = request.get(\'payment\', None)\n
simulation_state = request[\'simulation_state\']\n simulation_state = request[\'simulation_state\']\n
from_date = request.get(\'from_date\', None)\n from_date = request.get(\'from_date\', None)\n
detailed_from_date_summary = request.get(\'detailed_from_date_summary\', 0)\n
omit_grouping_reference = request.get(\'omit_grouping_reference\', 0)\n omit_grouping_reference = request.get(\'omit_grouping_reference\', 0)\n
parent_portal_type = request.get(\'portal_type\')\n parent_portal_type = request.get(\'portal_type\')\n
period_start_date = context\\\n period_start_date = context\\\n
...@@ -109,7 +112,9 @@ params = dict(at_date=at_date,\n ...@@ -109,7 +112,9 @@ params = dict(at_date=at_date,\n
period_start_date=period_start_date,\n period_start_date=period_start_date,\n
section_uid=section_uid,\n section_uid=section_uid,\n
node_uid=traverse(node).getUid(),\n node_uid=traverse(node).getUid(),\n
simulation_state=simulation_state, )\n simulation_state=simulation_state,\n
detailed_from_date_summary=detailed_from_date_summary)\n
\n
if from_date:\n if from_date:\n
params[\'from_date\'] = from_date\n params[\'from_date\'] = from_date\n
if payment:\n if payment:\n
...@@ -130,7 +135,30 @@ selection_columns = [\n ...@@ -130,7 +135,30 @@ selection_columns = [\n
(\'credit\', \'Credit\'),\n (\'credit\', \'Credit\'),\n
(\'running_total_price\', \'Net\'),]\n (\'running_total_price\', \'Net\'),]\n
\n \n
return [ ReportSection(\n report_section_list = []\n
if from_date and detailed_from_date_summary:\n
report_section_list.append(\n
ReportSection(form_id=\'\', level=4,\n
title=N_(\'Not Grouped Lines in Beginning Balance\')))\n
\n
report_section_list.append(\n
ReportSection(\n
path=node,\n
form_id=\'Account_viewNotGroupedAccountingTransactionList\',\n
selection_name=\'account_preference_selection\',\n
selection_params=params,\n
selection_columns=selection_columns,\n
listbox_display_mode=\'FlatListMode\',\n
selection_sort_order=[\n
(\'stock.date\', \'ascending\'),\n
(\'stock.uid\', \'ascending\')],))\n
\n
report_section_list.append(\n
ReportSection(form_id=None, level=4,\n
title=N_(\'Lines in the Period\')))\n
\n
report_section_list.append(\n
ReportSection(\n
path=node,\n path=node,\n
form_id=\'Account_viewAccountingTransactionList\',\n form_id=\'Account_viewAccountingTransactionList\',\n
selection_name=\'account_preference_selection\',\n selection_name=\'account_preference_selection\',\n
...@@ -139,9 +167,9 @@ return [ ReportSection(\n ...@@ -139,9 +167,9 @@ return [ ReportSection(\n
listbox_display_mode=\'FlatListMode\',\n listbox_display_mode=\'FlatListMode\',\n
selection_sort_order=[\n selection_sort_order=[\n
(\'stock.date\', \'ascending\'),\n (\'stock.date\', \'ascending\'),\n
(\'stock.uid\', \'ascending\')],) ]\n (\'stock.uid\', \'ascending\')],))\n
\n \n
# vim: syntax=python\n return report_section_list\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -186,10 +214,13 @@ return [ ReportSection(\n ...@@ -186,10 +214,13 @@ return [ ReportSection(\n
<tuple> <tuple>
<string>Products.ERP5Form.Report</string> <string>Products.ERP5Form.Report</string>
<string>ReportSection</string> <string>ReportSection</string>
<string>Products.ERP5Type.Message</string>
<string>Message</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>request</string> <string>request</string>
<string>traverse</string> <string>traverse</string>
<string>N_</string>
<string>True</string> <string>True</string>
<string>_getitem_</string> <string>_getitem_</string>
<string>at_date</string> <string>at_date</string>
...@@ -200,6 +231,7 @@ return [ ReportSection(\n ...@@ -200,6 +231,7 @@ return [ ReportSection(\n
<string>payment</string> <string>payment</string>
<string>simulation_state</string> <string>simulation_state</string>
<string>from_date</string> <string>from_date</string>
<string>detailed_from_date_summary</string>
<string>omit_grouping_reference</string> <string>omit_grouping_reference</string>
<string>parent_portal_type</string> <string>parent_portal_type</string>
<string>period_start_date</string> <string>period_start_date</string>
...@@ -209,6 +241,7 @@ return [ ReportSection(\n ...@@ -209,6 +241,7 @@ return [ ReportSection(\n
<string>params</string> <string>params</string>
<string>_write_</string> <string>_write_</string>
<string>selection_columns</string> <string>selection_columns</string>
<string>report_section_list</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -95,6 +95,7 @@ ...@@ -95,6 +95,7 @@
<string>your_section_category</string> <string>your_section_category</string>
<string>your_from_date</string> <string>your_from_date</string>
<string>your_at_date</string> <string>your_at_date</string>
<string>your_detailed_from_date_summary</string>
<string>your_omit_grouping_reference</string> <string>your_omit_grouping_reference</string>
<string>your_portal_skin</string> <string>your_portal_skin</string>
</list> </list>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.Formulator.StandardFields</string>
<string>CheckBoxField</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>your_detailed_from_date_summary</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>Checking this will produce a detailed beginning balance with all lines without a letter</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>Detailed Beginning Balance</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.PythonScripts.PythonScript</string>
<string>PythonScript</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Python_magic</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </value>
</item>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary>
<item>
<key> <string>name_container</string> </key>
<value> <string>container</string> </value>
</item>
<item>
<key> <string>name_context</string> </key>
<value> <string>context</string> </value>
</item>
<item>
<key> <string>name_m_self</string> </key>
<value> <string>script</string> </value>
</item>
<item>
<key> <string>name_subpath</string> </key>
<value> <string>traverse_subpath</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.PythonScripts.standard import Object\n
request = container.REQUEST\n
\n
return [Object(\n
debit=request.get(\n
\'Account_statNotGroupedAccountingTransactionList.total_debit\'),\n
credit=request.get(\n
\'Account_statNotGroupedAccountingTransactionList.total_credit\'),)]\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>**kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>func_code</string> </key>
<value>
<object>
<klass>
<global name="FuncCode" module="Shared.DC.Scripts.Signature"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>kw</string>
<string>Products.PythonScripts.standard</string>
<string>Object</string>
<string>_getattr_</string>
<string>container</string>
<string>request</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Account_statNotGroupedAccountingTransactionList</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<tuple>
<string>Products.ERP5Form.Form</string>
<string>ERP5Form</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>__ac_local_roles__</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_bind_names</string> </key>
<value>
<object>
<klass>
<global name="NameAssignments" module="Shared.DC.Scripts.Bindings"/>
</klass>
<tuple/>
<state>
<dictionary>
<item>
<key> <string>_asgns</string> </key>
<value>
<dictionary/>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>_objects</string> </key>
<value>
<tuple/>
</value>
</item>
<item>
<key> <string>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>action</string> </key>
<value> <string>Base_edit</string> </value>
</item>
<item>
<key> <string>encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>enctype</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>group_list</string> </key>
<value>
<list>
<string>left</string>
<string>right</string>
<string>center</string>
<string>bottom</string>
<string>hidden</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>bottom</string> </key>
<value>
<list>
<string>listbox</string>
</list>
</value>
</item>
<item>
<key> <string>center</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>hidden</string> </key>
<value>
<list>
<string>listbox_debit</string>
<string>listbox_credit</string>
<string>listbox_total_price</string>
<string>listbox_running_total_price</string>
<string>listbox_date</string>
</list>
</value>
</item>
<item>
<key> <string>left</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>right</string> </key>
<value>
<list/>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Account_viewNotGroupedAccountingTransactionList</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>Account_viewAccountingTransactionList</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_view</string> </value>
</item>
<item>
<key> <string>row_length</string> </key>
<value> <int>4</int> </value>
</item>
<item>
<key> <string>stored_encoding</string> </key>
<value> <string>UTF-8</string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Account</string> </value>
</item>
<item>
<key> <string>unicode_mode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>update_action</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -153,6 +153,11 @@ if not selection_params.get(\'no_mirror_section_uid_cache\', 0):\n ...@@ -153,6 +153,11 @@ if not selection_params.get(\'no_mirror_section_uid_cache\', 0):\n
if payment_uid:\n if payment_uid:\n
params[\'payment_uid\'] = payment_uid\n params[\'payment_uid\'] = payment_uid\n
\n \n
# Detailed Beginning Balance, from Account Statement \n
detailed_from_date_summary = selection_params.get(\'detailed_from_date_summary\', None)\n
if detailed_from_date_summary is not None:\n
params[\'detailed_from_date_summary\'] = detailed_from_date_summary\n
\n
simulation_state = selection_params.get(\'simulation_state\',\n simulation_state = selection_params.get(\'simulation_state\',\n
preference.getPreferredAccountingTransactionSimulationStateList())\n preference.getPreferredAccountingTransactionSimulationStateList())\n
if simulation_state:\n if simulation_state:\n
...@@ -234,6 +239,7 @@ return dict(params)\n ...@@ -234,6 +239,7 @@ return dict(params)\n
<string>precision</string> <string>precision</string>
<string>mirror_section_uid</string> <string>mirror_section_uid</string>
<string>payment_uid</string> <string>payment_uid</string>
<string>detailed_from_date_summary</string>
<string>simulation_state</string> <string>simulation_state</string>
<string>portal_type</string> <string>portal_type</string>
<string>parent_portal_type</string> <string>parent_portal_type</string>
......
349 350
\ 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