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

Use inventory API for Account's transactions too (reports will have to be

upgraded)



git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@10977 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent f650ffb2
...@@ -68,133 +68,10 @@ ...@@ -68,133 +68,10 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>src__ = kw.get(\'src__\', False)\n <value> <string>"""Returns Accounting Transactions where this account is node.\n
precision = context.Base_getPreferredPrecision()\n """\n
r_ = lambda x: context.Base_getRoundValue(x, precision)\n kw[\'node_uid\'] = context.getUid()\n
\n return context.Node_getAccountingTransactionList(**kw)\n
# TODO: Selection override Preferences.\n
# Thanks to this, we can generate accounting reports based on generic listbox: from the ERP5 html view, no selection are set, so preferences are get as parameters to get the list of accounting lines. In case of accounting report (like AccountModule_getGeneralLedgerReportSectionList) we set the selection to pass parameters to the listbox.\n
selection_kw = {}\n
if selection != None:\n
selection_kw = selection.getParams()\n
context.log("Selection must overide preference here for AccountModule_getGeneralLedgerReportSectionList !", repr(selection_kw))\n
\n
if selection_kw.has_key(\'is_accounting_report\'):\n
request = context.REQUEST\n
request.set(\'is_accounting_report\', True)\n
\n
# Read settings from user preference\n
preference = context.getPortalObject().portal_preferences\n
simulation_state = kw.get(\'simulation_state\', preference.getPreferredAccountingTransactionSimulationStateList())\n
section_category = kw.get(\'section_category\', preference.getPreferredAccountingTransactionSectionCategory())\n
from_date = kw.get(\'from_date\', preference.getPreferredAccountingTransactionFromDate())\n
at_date = kw.get(\'at_date\', preference.getPreferredAccountingTransactionAtDate())\n
\n
# Build the common inventory dict\n
params = {}\n
\n
if kw.get(\'no_from_date\', False):\n
from_date = None\n
\n
if simulation_state:\n
params[\'simulation_state\'] = simulation_state\n
if section_category:\n
params[\'section_category\'] = section_category\n
\n
# Get payment and mirror related parameters\n
MARKER = []\n
no_payment_uid = kw.get(\'no_payment_uid\', MARKER)\n
payment_uid = kw.get(\'payment_uid\', MARKER)\n
no_mirror_section_uid = kw.get(\'no_mirror_section_uid\', MARKER)\n
mirror_section_uid = kw.get(\'mirror_section_uid\', MARKER)\n
# Try alternate method to get payment_uid\n
if no_payment_uid is MARKER: no_payment_uid = kw.get(\'no_source_uid\', MARKER)\n
if payment_uid is MARKER: payment_uid = kw.get(\'source_uid\', MARKER)\n
# Save results in the dict\n
if no_payment_uid is not MARKER: params[\'no_payment_uid\'] = True\n
if payment_uid is not MARKER: params[\'payment_uid\'] = payment_uid\n
if no_mirror_section_uid is not MARKER: params[\'no_mirror_section_uid\'] = True\n
if mirror_section_uid is not MARKER: params[\'mirror_section_uid\'] = mirror_section_uid\n
\n
# Get node_uid parameters\n
params[\'node_uid\'] = kw.get(\'node_uid\', context.getUid())\n
\n
# Create the related accouting line list\n
new_result = []\n
net_balance = 0.0\n
\n
if from_date is not None:\n
# Create a new parameter list to get the previous balance\n
get_inventory_kw = params.copy()\n
get_inventory_kw.update({ \'to_date\' : from_date,\n
\'where_expression\': " section.portal_type = \'Organisation\' "\n
})\n
\n
# Get previous debit and credit\n
getInventoryAssetPrice = context.getPortalObject().portal_simulation.getInventoryAssetPrice\n
previous_total_debit = getInventoryAssetPrice(omit_output=True, **get_inventory_kw)\n
previous_total_credit = getInventoryAssetPrice(omit_input =True, **get_inventory_kw)\n
\n
if previous_total_credit != 0:\n
previous_total_credit = - previous_total_credit\n
\n
# Show the previous balance if not empty\n
if previous_total_credit != 0 or previous_total_debit != 0:\n
from Products.ERP5Type.Document import newTempAccountingTransaction\n
\n
net_balance = r_(previous_total_debit - previous_total_credit)\n
previous_balance = newTempAccountingTransaction( context.getPortalObject()\n
, "temp_%s" % context.getUid()\n
)\n
previous_balance.setUid(\'new_000\')\n
\n
previous_balance.edit( \\\n
title = context.Base_translateString("Previous Balance")\n
, date = from_date and (from_date - 1) or None\n
, portal_type = ""\n
, simulation_state_title = ""\n
, debit = previous_total_debit\n
, credit = previous_total_credit\n
, balance = net_balance\n
, net_balance = net_balance\n
, is_previous_balance = True\n
)\n
new_result.append(previous_balance)\n
\n
# FIXME:\n
# using listbox current page number * number of line per listbox page, you can call a\n
# ZSQL Method to initialize net_balance and calculate this only for this page.\n
#\n
# But this is just temporary because some day, erp5_accounting will be rewritten using\n
# only portal_catalog and getInventory. The Iventory API should provide a way to implement\n
# such a net_balance column (in one instruction, so that we do not need to write a wrapping\n
# list method like this one)\n
result = context.Account_zGetAccountingTransactionList( from_date = from_date\n
, at_date = at_date\n
, src__ = src__\n
, **params\n
)\n
if src__:\n
return result\n
\n
# Add related accounting lines one by one in order to calculate intermediate balance\n
for l in result:\n
o = l.getObject()\n
net_balance += l.balance or 0.0\n
if o is not None:\n
c = o.asContext( net_balance = net_balance\n
, balance = l.balance\n
, credit = l.credit\n
, debit = l.debit\n
, date = l.date\n
, specific_reference = l.specific_reference\n
, current_transaction_line_path = l.current_transaction_line_path\n
, third_party = l.third_party\n
, payment = l.payment_uid\n
)\n
new_result.append(c)\n
\n
return new_result\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -217,7 +94,7 @@ return new_result\n ...@@ -217,7 +94,7 @@ return new_result\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>selection=None, **kw</string> </value> <value> <string>**kw</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -237,52 +114,17 @@ return new_result\n ...@@ -237,52 +114,17 @@ return new_result\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>1</int> </value> <value> <int>0</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple> <tuple>
<string>selection</string>
<string>kw</string> <string>kw</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>False</string>
<string>src__</string>
<string>context</string> <string>context</string>
<string>precision</string>
<string>r_</string>
<string>selection_kw</string>
<string>None</string>
<string>repr</string>
<string>request</string>
<string>True</string>
<string>preference</string>
<string>simulation_state</string>
<string>section_category</string>
<string>from_date</string>
<string>at_date</string>
<string>params</string>
<string>_write_</string> <string>_write_</string>
<string>MARKER</string>
<string>no_payment_uid</string>
<string>payment_uid</string>
<string>no_mirror_section_uid</string>
<string>mirror_section_uid</string>
<string>new_result</string>
<string>net_balance</string>
<string>get_inventory_kw</string>
<string>getInventoryAssetPrice</string>
<string>_apply_</string> <string>_apply_</string>
<string>previous_total_debit</string>
<string>previous_total_credit</string>
<string>Products.ERP5Type.Document</string>
<string>newTempAccountingTransaction</string>
<string>previous_balance</string>
<string>result</string>
<string>_getiter_</string>
<string>l</string>
<string>o</string>
<string>c</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -294,9 +136,7 @@ return new_result\n ...@@ -294,9 +136,7 @@ return new_result\n
<item> <item>
<key> <string>func_defaults</string> </key> <key> <string>func_defaults</string> </key>
<value> <value>
<tuple> <none/>
<none/>
</tuple>
</value> </value>
</item> </item>
<item> <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>
<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>"""Total balance of all accounting transactions having this\n
account as node\n
"""\n
kw[\'node_uid\'] = context.getUid()\n
return context.Node_statAccountingBalance(**kw)\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>_getattr_</string>
<string>context</string>
<string>_write_</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>Account_statBalance</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.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>"""Total credit of all accounting transactions having this\n
account as node\n
"""\n
kw[\'node_uid\'] = context.getUid()\n
kw[\'omit_input\'] = 1\n
# here, or 0 is to prevent displaying "- 0"\n
return - context.Node_statAccountingBalance(**kw) or 0\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>_getattr_</string>
<string>context</string>
<string>_write_</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>Account_statCredit</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.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>"""Total debit of all accounting transactions having this\n
account as a node\n
"""\n
kw[\'node_uid\'] = context.getUid()\n
kw[\'omit_output\'] = 1\n
return context.Node_statAccountingBalance(**kw)\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>_getattr_</string>
<string>context</string>
<string>_write_</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>Account_statDebit</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -254,6 +254,10 @@ ...@@ -254,6 +254,10 @@
<key> <string>meta_types</string> </key> <key> <string>meta_types</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>portal_types</string> </key> <key> <string>portal_types</string> </key>
<value> <value>
...@@ -342,11 +346,11 @@ ...@@ -342,11 +346,11 @@
<value> <value>
<list> <list>
<tuple> <tuple>
<string>specific_reference</string> <string>Movement_getSpecificReference</string>
<string>Reference</string> <string>Reference</string>
</tuple> </tuple>
<tuple> <tuple>
<string>title</string> <string>Movement_getExplanationTitle</string>
<string>Title</string> <string>Title</string>
</tuple> </tuple>
<tuple> <tuple>
...@@ -354,35 +358,35 @@ ...@@ -354,35 +358,35 @@
<string>Date</string> <string>Date</string>
</tuple> </tuple>
<tuple> <tuple>
<string>translated_portal_type</string> <string>Movement_getExplanationTranslatedPortalType</string>
<string>Type</string> <string>Type</string>
</tuple> </tuple>
<tuple> <tuple>
<string>reference</string> <string>Movement_getExplanationReference</string>
<string>Invoice Number</string> <string>Invoice Number</string>
</tuple> </tuple>
<tuple> <tuple>
<string>third_party</string> <string>Movement_getMirrorSectionTitle</string>
<string>Third Party</string> <string>Third Party</string>
</tuple> </tuple>
<tuple> <tuple>
<string>translated_simulation_state_title</string> <string>getTranslatedSimulationStateTitle</string>
<string>State</string> <string>State</string>
</tuple> </tuple>
<tuple> <tuple>
<string>debit</string> <string>Movement_getDebitPrice</string>
<string>Debit</string> <string>Debit</string>
</tuple> </tuple>
<tuple> <tuple>
<string>credit</string> <string>Movement_getCreditPrice</string>
<string>Credit</string> <string>Credit</string>
</tuple> </tuple>
<tuple> <tuple>
<string>balance</string> <string>total_price</string>
<string>Balance</string> <string>Balance</string>
</tuple> </tuple>
<tuple> <tuple>
<string>net_balance</string> <string>running_total_price</string>
<string>Net</string> <string>Net</string>
</tuple> </tuple>
</list> </list>
...@@ -415,11 +419,11 @@ ...@@ -415,11 +419,11 @@
<value> <value>
<list> <list>
<tuple> <tuple>
<string>portal_categories/group</string> <string>group</string>
<string>Group</string> <string>Group</string>
</tuple> </tuple>
<tuple> <tuple>
<string>portal_categories/region</string> <string>region</string>
<string>Region</string> <string>Region</string>
</tuple> </tuple>
</list> </list>
...@@ -497,6 +501,10 @@ ...@@ -497,6 +501,10 @@
<key> <string>not_viewable</string> </key> <key> <string>not_viewable</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item>
<key> <string>page_template</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>portal_types</string> </key> <key> <string>portal_types</string> </key>
<value> <value>
...@@ -559,7 +567,16 @@ ...@@ -559,7 +567,16 @@
<item> <item>
<key> <string>sort</string> </key> <key> <string>sort</string> </key>
<value> <value>
<list/> <list>
<tuple>
<string>stock.date</string>
<string>ASC</string>
</tuple>
<tuple>
<string>stock.uid</string>
<string>ASC</string>
</tuple>
</list>
</value> </value>
</item> </item>
<item> <item>
...@@ -573,16 +590,16 @@ ...@@ -573,16 +590,16 @@
<value> <value>
<list> <list>
<tuple> <tuple>
<string>debit</string> <string>Movement_getDebitPrice</string>
<string>Account_statSourceDebit</string> <string>Account_statDebit</string>
</tuple> </tuple>
<tuple> <tuple>
<string>credit</string> <string>Movement_getCreditPrice</string>
<string>Account_statSourceCredit</string> <string>Account_statCredit</string>
</tuple> </tuple>
<tuple> <tuple>
<string>balance</string> <string>total_price</string>
<string>Account_statSourceBalance</string> <string>Account_statBalance</string>
</tuple> </tuple>
</list> </list>
</value> </value>
...@@ -658,7 +675,7 @@ ...@@ -658,7 +675,7 @@
<dictionary> <dictionary>
<item> <item>
<key> <string>_text</string> </key> <key> <string>_text</string> </key>
<value> <string>python: getattr(cell, \'is_previous_balance\', False) and [(x[0], None) for x in form.listbox.get_value(\'columns\')]</string> </value> <value> <string>python: getattr(request.get(\'cell\', here), \'is_previous_balance\', False) or [(x[0], \'Movement_getExplanationUrl\') for x in form.listbox.get_value(\'columns\')]</string> </value>
</item> </item>
</dictionary> </dictionary>
</pickle> </pickle>
......
<?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>return "%s/view" % brain.getObject().getExplanation()\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>_owner</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string>brain, selection=None, **kwd</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>2</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
<value>
<tuple>
<string>brain</string>
<string>selection</string>
<string>kwd</string>
<string>_getattr_</string>
</tuple>
</value>
</item>
</dictionary>
</state>
</object>
</value>
</item>
<item>
<key> <string>func_defaults</string> </key>
<value>
<tuple>
<none/>
</tuple>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>Movement_getExplanationUrl</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.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># Example code:\n
\n
# Import a standard function, and get the HTML request and response objects.\n
from Products.PythonScripts.standard import html_quote\n
request = container.REQUEST\n
RESPONSE = request.RESPONSE\n
\n
# Return a string identifying this script.\n
print "This is the", script.meta_type, \'"%s"\' % script.getId(),\n
if script.title:\n
print "(%s)" % html_quote(script.title),\n
print "in", container.absolute_url()\n
return printed\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>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>_print_</string>
<string>_print</string>
<string>Products.PythonScripts.standard</string>
<string>html_quote</string>
<string>_getattr_</string>
<string>container</string>
<string>request</string>
<string>RESPONSE</string>
<string>script</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>Movement_statBalance</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
108 109
\ 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