Commit de83b7b9 authored by Jérome Perrin's avatar Jérome Perrin

added a summary on trial balance


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@5685 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent c04008df
......@@ -85,9 +85,9 @@ expand_accounts = request.get(\'expand_accounts\', 0)\n
\n
# flat_mode is a boolean that indicate wether we should use a report tree \n
# or a flat list of all accounts. \n
tree_mode = request.get(\'tree_mode\', 0)\n
tree_mode = request.get(\'tree_mode\', 0)\n
if tree_mode :\n
raise \'tree mode no longer supported, sorry\'\n
raise \'tree mode no longer supported\'\n
\n
result = []\n
params = {\n
......@@ -167,6 +167,20 @@ else :\n
)\n
)\n
\n
if 1:\n
result.append( ReportSection( path=portal.account_module.getPhysicalPath(),\n
title = \'\\n\', form_id = None )) # spacer\n
\n
result.append( ReportSection( path=portal.account_module.getPhysicalPath(),\n
title=\'\',\n
form_id=\'AccountModule_viewTrialBalanceSummary\',\n
selection_name=\'account_selection\',\n
listbox_display_mode=\'FlatListMode\',\n
selection_params=params,\n
preferences=preferences\n
) )\n
\n
\n
return result\n
</string> </value>
</item>
......
<?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> <string encoding="base64">O/INCg==</string> </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 encoding="cdata"><![CDATA[
from DateTime import DateTime\n
from Products.ERP5Type.Document import newTempBase\n
selection_params = selection.getParams()\n
get_inventory_kw = {}\n
get_inventory_kw[\'section_category\'] = selection_params.get(\'section_category\')\n
get_inventory_kw[\'simulation_state\'] = selection_params.get(\'transaction_simulation_state\')\n
get_inventory_kw[\'node_category\'] = selection_params.get(\'gap_root\')\n
get_inventory_kw[\'omit_simulation\'] = 1\n
\n
no_start_date = DateTime(1970, 1, 1)\n
\n
portal = context.getPortalObject()\n
getInventory = portal.portal_simulation.getInventoryAssetPrice\n
\n
\n
list_item = newTempBase(portal, \'xxx\')\n
list_item.setUid(\'new_000\')\n
list_item.edit(** {\n
# FIXME: here we do not want to sum all movement < 0, but sum the balances \n
# of all nodes whose which have a < 0 balance...\n
\'total_opening_debit_balance\' : getInventory(\n
at_date = selection_params.get(\'from_date\', no_start_date),\n
omit_output = 1,\n
**get_inventory_kw) or 0,\n
\n
\'total_opening_credit_balance\' : - getInventory(\n
at_date = selection_params.get(\'from_date\', no_start_date),\n
omit_input = 1,\n
**get_inventory_kw) or 0,\n
\n
\'total_closing_debit_balance\' : getInventory(\n
at_date = selection_params.get(\'at_date\'),\n
omit_output = 1,\n
**get_inventory_kw) or 0,\n
\n
\'total_closing_credit_balance\' : - getInventory(\n
at_date = selection_params.get(\'at_date\'),\n
omit_input = 1,\n
**get_inventory_kw) or 0,\n
})\n
return [list_item]\n
]]></string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_dav_writelocks</string> </key>
<value>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>_filepath</string> </key>
<value> <string>Script (Python):/nexedi/portal_skins/erp5_accounting/AccountModule_getTrialBalanceSummary</string> </value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>selection, **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>1</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>selection</string>
<string>kw</string>
<string>DateTime</string>
<string>Products.ERP5Type.Document</string>
<string>newTempBase</string>
<string>_getattr_</string>
<string>selection_params</string>
<string>get_inventory_kw</string>
<string>_write_</string>
<string>no_start_date</string>
<string>context</string>
<string>portal</string>
<string>getInventory</string>
<string>list_item</string>
<string>_apply_</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>AccountModule_getTrialBalanceSummary</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<tuple>
<string>Persistence</string>
<string>PersistentMapping</string>
</tuple>
<none/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_container</string> </key>
<value>
<dictionary/>
</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>action</string> </key>
<value> <string></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>Default</string>
</list>
</value>
</item>
<item>
<key> <string>groups</string> </key>
<value>
<dictionary>
<item>
<key> <string>Default</string> </key>
<value>
<list>
<string>listbox</string>
</list>
</value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>AccountModule_viewTrialBalanceSummary</string> </value>
</item>
<item>
<key> <string>method</string> </key>
<value> <string>POST</string> </value>
</item>
<item>
<key> <string>name</string> </key>
<value> <string>AccountModule_viewTrialBalanceSummary</string> </value>
</item>
<item>
<key> <string>pt</string> </key>
<value> <string>form_list</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>Trial Balance Summary</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>
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