Commit 421ebbaa authored by Jérome Perrin's avatar Jérome Perrin

supports hiding or aggregating analytics in general ledger, journal and account statement

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36154 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 9169913c
...@@ -82,6 +82,7 @@ payment = request.get(\'payment\', None)\n ...@@ -82,6 +82,7 @@ payment = request.get(\'payment\', None)\n
function = request.get(\'function\', None)\n function = request.get(\'function\', None)\n
project = request.get(\'project\', None)\n project = request.get(\'project\', None)\n
simulation_state = request[\'simulation_state\']\n simulation_state = request[\'simulation_state\']\n
hide_analytic = request[\'hide_analytic\']\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 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
...@@ -122,6 +123,14 @@ if mirror_section:\n ...@@ -122,6 +123,14 @@ if mirror_section:\n
if parent_portal_type:\n if parent_portal_type:\n
params[\'parent_portal_type\'] = parent_portal_type\n params[\'parent_portal_type\'] = parent_portal_type\n
\n \n
analytic_column_list = ()\n
if hide_analytic:\n
params[\'group_by\'] = ( \'explanation_uid\',\n
\'mirror_section_uid\',\n
\'payment_uid\', )\n
else:\n
analytic_column_list = context.AccountModule_getAnalyticColumnList()\n
params[\'analytic_column_list\'] = analytic_column_list\n
\n \n
selection_columns = (\n selection_columns = (\n
(\'Movement_getSpecificReference\', \'Transaction Reference\'),\n (\'Movement_getSpecificReference\', \'Transaction Reference\'),\n
...@@ -129,7 +138,7 @@ selection_columns = (\n ...@@ -129,7 +138,7 @@ selection_columns = (\n
(\'Movement_getExplanationTitle\', \'Accounting Transaction Title\'), )\n (\'Movement_getExplanationTitle\', \'Accounting Transaction Title\'), )\n
if len(section_uid) > 1:\n if len(section_uid) > 1:\n
selection_columns += ( (\'section_title\', \'Section\'), )\n selection_columns += ( (\'section_title\', \'Section\'), )\n
selection_columns += (\n selection_columns += analytic_column_list + (\n
(\'Movement_getMirrorSectionTitle\', \'Third Party\'),\n (\'Movement_getMirrorSectionTitle\', \'Third Party\'),\n
(\'debit_price\', \'Debit\'),\n (\'debit_price\', \'Debit\'),\n
(\'credit_price\', \'Credit\'),\n (\'credit_price\', \'Credit\'),\n
...@@ -227,6 +236,7 @@ return report_section_list\n ...@@ -227,6 +236,7 @@ return report_section_list\n
<string>function</string> <string>function</string>
<string>project</string> <string>project</string>
<string>simulation_state</string> <string>simulation_state</string>
<string>hide_analytic</string>
<string>from_date</string> <string>from_date</string>
<string>detailed_from_date_summary</string> <string>detailed_from_date_summary</string>
<string>omit_grouping_reference</string> <string>omit_grouping_reference</string>
...@@ -237,6 +247,7 @@ return report_section_list\n ...@@ -237,6 +247,7 @@ return report_section_list\n
<string>dict</string> <string>dict</string>
<string>params</string> <string>params</string>
<string>_write_</string> <string>_write_</string>
<string>analytic_column_list</string>
<string>selection_columns</string> <string>selection_columns</string>
<string>len</string> <string>len</string>
<string>_inplacevar_</string> <string>_inplacevar_</string>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>"""Returns the list of columns to use in accounting reports (GL, account statement, journal)\n
"""\n
\n
portal = context.getPortalObject()\n
request = portal.REQUEST\n
\n
# cache the title in the request, it will be used by Movement_getProjectTitle\n
# and Movement_getFunctionTitle scripts\n
request.other[\'Movement_getProjectTitle.project_title_dict\'\n
] = project_title_dict = dict()\n
request.other[\'Movement_getFunctionTitle.function_title_dict\'\n
] = function_title_dict = dict()\n
\n
analytic_column_list = ()\n
project_item_list = context.AccountingTransactionLine_getProjectItemList()\n
if project_item_list:\n
analytic_column_list += ((\'project\', \'Project\'),)\n
for v, k in project_item_list:\n
if k:\n
project_title_dict[portal.portal_categories.restrictedTraverse(k).getUid()] = v\n
function_item_list = context.AccountingTransactionLine_getFunctionItemList()\n
if function_item_list:\n
analytic_column_list += ((\'function\', context.AccountingTransactionLine_getFunctionBaseCategoryTitle()),)\n
for v, k in function_item_list:\n
if k:\n
function_title_dict[portal.portal_categories.restrictedTraverse(k).getUid()] = v\n
for base_category in \\\n
portal.portal_preferences.getPreferredAccountingTransactionLineAnalyticBaseCategoryList() or []:\n
title = portal.portal_categories.restrictedTraverse(base_category).getTitle()\n
analytic_column_list += ((\'%s_translated_title\' % base_category, title),)\n
\n
return analytic_column_list\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></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>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>request</string>
<string>dict</string>
<string>_write_</string>
<string>project_title_dict</string>
<string>function_title_dict</string>
<string>analytic_column_list</string>
<string>project_item_list</string>
<string>_inplacevar_</string>
<string>_getiter_</string>
<string>v</string>
<string>k</string>
<string>function_item_list</string>
<string>base_category</string>
<string>title</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_getAnalyticColumnList</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -58,8 +58,8 @@ ...@@ -58,8 +58,8 @@
"""Get the report sections for general ledger\n """Get the report sections for general ledger\n
"""\n """\n
from Products.ERP5Form.Report import ReportSection\n from Products.ERP5Form.Report import ReportSection\n
request = context.REQUEST\n
portal = context.portal_url.getPortalObject()\n portal = context.portal_url.getPortalObject()\n
request = portal.REQUEST\n
cat_tool = portal.portal_categories\n cat_tool = portal.portal_categories\n
sim_tool = portal.portal_simulation\n sim_tool = portal.portal_simulation\n
Base_translateString = context.Base_translateString\n Base_translateString = context.Base_translateString\n
...@@ -69,6 +69,7 @@ section_category = request[\'section_category\']\n ...@@ -69,6 +69,7 @@ section_category = request[\'section_category\']\n
section_uid = context.Base_getSectionUidListForSectionCategory(\n section_uid = context.Base_getSectionUidListForSectionCategory(\n
section_category, request[\'section_category_strict\'])\n section_category, request[\'section_category_strict\'])\n
simulation_state = request[\'simulation_state\']\n simulation_state = request[\'simulation_state\']\n
hide_analytic = request[\'hide_analytic\']\n
from_date = request.get(\'from_date\', None)\n from_date = request.get(\'from_date\', None)\n
gap_list = []\n gap_list = []\n
for gap in request.get(\'gap_list\', ()):\n for gap in request.get(\'gap_list\', ()):\n
...@@ -103,8 +104,15 @@ function = request.get(\'function\')\n ...@@ -103,8 +104,15 @@ function = request.get(\'function\')\n
if function:\n if function:\n
params[\'function_uid\'] = portal.portal_categories.restrictedTraverse(function).getUid()\n params[\'function_uid\'] = portal.portal_categories.restrictedTraverse(function).getUid()\n
\n \n
analytic_columns = ()\n default_selection_params = params.copy()\n
group_analytics = False # XXX \'group\' in the sense of grouping\n \n
analytic_column_list = ()\n
if hide_analytic:\n
default_selection_params[\'group_by\'] = ( \'explanation_uid\',\n
\'mirror_section_uid\',\n
\'payment_uid\' )\n
else:\n
analytic_column_list = context.AccountModule_getAnalyticColumnList()\n
\n \n
account_columns = (\n account_columns = (\n
(\'Movement_getSpecificReference\', \'Reference\'),\n (\'Movement_getSpecificReference\', \'Reference\'),\n
...@@ -116,6 +124,7 @@ account_columns = (\n ...@@ -116,6 +124,7 @@ account_columns = (\n
if len(simulation_state) > 1:\n if len(simulation_state) > 1:\n
account_columns += (\n account_columns += (\n
(\'getTranslatedSimulationStateTitle\', \'State\'),)\n (\'getTranslatedSimulationStateTitle\', \'State\'),)\n
account_columns += analytic_column_list\n
account_columns += (\n account_columns += (\n
(\'debit_price\', \'Debit\'),\n (\'debit_price\', \'Debit\'),\n
(\'credit_price\', \'Credit\'),\n (\'credit_price\', \'Credit\'),\n
...@@ -205,7 +214,7 @@ for inventory in portal.portal_simulation.getInventoryList(\n ...@@ -205,7 +214,7 @@ for inventory in portal.portal_simulation.getInventoryList(\n
key = (inventory.node_relative_url, None, None)\n key = (inventory.node_relative_url, None, None)\n
existing_section_dict[key] = True\n existing_section_dict[key] = True\n
\n \n
selection_params = params.copy()\n selection_params = default_selection_params.copy()\n
selection_params[\'from_date\'] = from_date\n selection_params[\'from_date\'] = from_date\n
selection_params[\'at_date\'] = at_date\n selection_params[\'at_date\'] = at_date\n
selection_params[\'node_uid\'] = inventory.node_uid\n selection_params[\'node_uid\'] = inventory.node_uid\n
...@@ -238,7 +247,7 @@ for inventory in portal.portal_simulation.getInventoryList(\n ...@@ -238,7 +247,7 @@ for inventory in portal.portal_simulation.getInventoryList(\n
continue\n continue\n
existing_section_dict[key] = True\n existing_section_dict[key] = True\n
\n \n
selection_params = params.copy()\n selection_params = default_selection_params.copy()\n
selection_params[\'from_date\'] = from_date\n selection_params[\'from_date\'] = from_date\n
selection_params[\'at_date\'] = at_date\n selection_params[\'at_date\'] = at_date\n
selection_params[\'node_uid\'] = inventory.node_uid\n selection_params[\'node_uid\'] = inventory.node_uid\n
...@@ -267,7 +276,7 @@ for inventory in portal.portal_simulation.getInventoryList(\n ...@@ -267,7 +276,7 @@ for inventory in portal.portal_simulation.getInventoryList(\n
group_by_resource=0,\n group_by_resource=0,\n
**params):\n **params):\n
key = (inventory.node_relative_url, None, None)\n key = (inventory.node_relative_url, None, None)\n
selection_params = params.copy()\n selection_params = default_selection_params.copy()\n
selection_params[\'from_date\'] = max(from_date, period_start_date)\n selection_params[\'from_date\'] = max(from_date, period_start_date)\n
selection_params[\'at_date\'] = at_date\n selection_params[\'at_date\'] = at_date\n
selection_params[\'period_start_date\'] = max(from_date, period_start_date)\n selection_params[\'period_start_date\'] = max(from_date, period_start_date)\n
...@@ -299,7 +308,7 @@ for inventory in portal.portal_simulation.getInventoryList(\n ...@@ -299,7 +308,7 @@ for inventory in portal.portal_simulation.getInventoryList(\n
key = (inventory.node_relative_url, inventory.mirror_section_uid, None)\n key = (inventory.node_relative_url, inventory.mirror_section_uid, None)\n
existing_section_dict[key] = True\n existing_section_dict[key] = True\n
\n \n
selection_params = params.copy()\n selection_params = default_selection_params.copy()\n
selection_params[\'from_date\'] = from_date\n selection_params[\'from_date\'] = from_date\n
selection_params[\'at_date\'] = at_date\n selection_params[\'at_date\'] = at_date\n
selection_params[\'node_uid\'] = inventory.node_uid\n selection_params[\'node_uid\'] = inventory.node_uid\n
...@@ -333,7 +342,7 @@ for inventory in portal.portal_simulation.getInventoryList(\n ...@@ -333,7 +342,7 @@ for inventory in portal.portal_simulation.getInventoryList(\n
continue\n continue\n
existing_section_dict[key] = True\n existing_section_dict[key] = True\n
\n \n
selection_params = params.copy()\n selection_params = default_selection_params.copy()\n
selection_params[\'from_date\'] = from_date\n selection_params[\'from_date\'] = from_date\n
selection_params[\'at_date\'] = at_date\n selection_params[\'at_date\'] = at_date\n
selection_params[\'node_uid\'] = inventory.node_uid\n selection_params[\'node_uid\'] = inventory.node_uid\n
...@@ -365,7 +374,7 @@ for inventory in portal.portal_simulation.getInventoryList(\n ...@@ -365,7 +374,7 @@ for inventory in portal.portal_simulation.getInventoryList(\n
key = (inventory.node_relative_url, None, inventory.payment_uid)\n key = (inventory.node_relative_url, None, inventory.payment_uid)\n
existing_section_dict[key] = True\n existing_section_dict[key] = True\n
\n \n
selection_params = params.copy()\n selection_params = default_selection_params.copy()\n
selection_params[\'from_date\'] = from_date\n selection_params[\'from_date\'] = from_date\n
selection_params[\'at_date\'] = at_date\n selection_params[\'at_date\'] = at_date\n
selection_params[\'node_uid\'] = inventory.node_uid\n selection_params[\'node_uid\'] = inventory.node_uid\n
...@@ -398,7 +407,7 @@ for inventory in portal.portal_simulation.getInventoryList(\n ...@@ -398,7 +407,7 @@ for inventory in portal.portal_simulation.getInventoryList(\n
continue\n continue\n
existing_section_dict[key] = True\n existing_section_dict[key] = True\n
\n \n
selection_params = params.copy()\n selection_params = default_selection_params.copy()\n
selection_params[\'from_date\'] = from_date\n selection_params[\'from_date\'] = from_date\n
selection_params[\'at_date\'] = at_date\n selection_params[\'at_date\'] = at_date\n
selection_params[\'node_uid\'] = inventory.node_uid\n selection_params[\'node_uid\'] = inventory.node_uid\n
...@@ -416,7 +425,7 @@ for inventory in portal.portal_simulation.getInventoryList(\n ...@@ -416,7 +425,7 @@ for inventory in portal.portal_simulation.getInventoryList(\n
\n \n
report_section_list.sort(key=ReportSection.getTitle)\n report_section_list.sort(key=ReportSection.getTitle)\n
\n \n
total_params = params.copy()\n total_params = default_selection_params.copy()\n
total_params[\'at_date\'] = at_date\n total_params[\'at_date\'] = at_date\n
report_section_list.append(ReportSection(\n report_section_list.append(ReportSection(\n
path=context.getPhysicalPath(),\n path=context.getPhysicalPath(),\n
...@@ -468,8 +477,8 @@ return report_section_list\n ...@@ -468,8 +477,8 @@ return report_section_list\n
<string>ReportSection</string> <string>ReportSection</string>
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>request</string>
<string>portal</string> <string>portal</string>
<string>request</string>
<string>cat_tool</string> <string>cat_tool</string>
<string>sim_tool</string> <string>sim_tool</string>
<string>Base_translateString</string> <string>Base_translateString</string>
...@@ -478,6 +487,7 @@ return report_section_list\n ...@@ -478,6 +487,7 @@ return report_section_list\n
<string>section_category</string> <string>section_category</string>
<string>section_uid</string> <string>section_uid</string>
<string>simulation_state</string> <string>simulation_state</string>
<string>hide_analytic</string>
<string>None</string> <string>None</string>
<string>from_date</string> <string>from_date</string>
<string>gap_list</string> <string>gap_list</string>
...@@ -495,8 +505,8 @@ return report_section_list\n ...@@ -495,8 +505,8 @@ return report_section_list\n
<string>params</string> <string>params</string>
<string>project</string> <string>project</string>
<string>function</string> <string>function</string>
<string>analytic_columns</string> <string>default_selection_params</string>
<string>group_analytics</string> <string>analytic_column_list</string>
<string>account_columns</string> <string>account_columns</string>
<string>len</string> <string>len</string>
<string>_inplacevar_</string> <string>_inplacevar_</string>
......
...@@ -101,6 +101,7 @@ ...@@ -101,6 +101,7 @@
<string>your_at_date</string> <string>your_at_date</string>
<string>your_detailed_from_date_summary</string> <string>your_detailed_from_date_summary</string>
<string>your_omit_grouping_reference</string> <string>your_omit_grouping_reference</string>
<string>your_hide_analytic</string>
<string>your_portal_skin</string> <string>your_portal_skin</string>
<string>your_format</string> <string>your_format</string>
<string>your_deferred_style</string> <string>your_deferred_style</string>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_hide_analytic</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>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>your_hide_analytic</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>AccountModule_viewDialogFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -96,6 +96,7 @@ ...@@ -96,6 +96,7 @@
<string>your_project</string> <string>your_project</string>
<string>your_section_category_strict</string> <string>your_section_category_strict</string>
<string>your_gap_list</string> <string>your_gap_list</string>
<string>your_hide_analytic</string>
</list> </list>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="CheckBoxField" module="Products.Formulator.StandardFields"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>your_hide_analytic</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>If checked, accounting lines that have been split for analytic detail will be aggregated together.</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>Hide Analytical Details</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -89,6 +89,7 @@ ...@@ -89,6 +89,7 @@
<string>your_from_date</string> <string>your_from_date</string>
<string>your_at_date</string> <string>your_at_date</string>
<string>your_omit_grouping_reference</string> <string>your_omit_grouping_reference</string>
<string>your_hide_analytic</string>
<string>your_portal_skin</string> <string>your_portal_skin</string>
<string>your_format</string> <string>your_format</string>
<string>your_deferred_style</string> <string>your_deferred_style</string>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_hide_analytic</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>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>your_hide_analytic</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>AccountModule_viewDialogFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -99,8 +99,9 @@ for brain in portal.Base_zGetNotGroupedMovementList(\n ...@@ -99,8 +99,9 @@ for brain in portal.Base_zGetNotGroupedMovementList(\n
if portal_type_filter and \\\n if portal_type_filter and \\\n
transaction.getPortalType() not in portal_type_list:\n transaction.getPortalType() not in portal_type_list:\n
continue\n continue\n
\n \n
if transaction.AccountingTransaction_isSourceView():\n is_source = transaction.AccountingTransaction_isSourceView()\n
if is_source:\n
if payment_uid and mvt.getSourcePaymentUid() != payment_uid:\n if payment_uid and mvt.getSourcePaymentUid() != payment_uid:\n
continue\n continue\n
if project_uid and mvt.getSourceProjectUid() != project_uid:\n if project_uid and mvt.getSourceProjectUid() != project_uid:\n
...@@ -109,6 +110,7 @@ for brain in portal.Base_zGetNotGroupedMovementList(\n ...@@ -109,6 +110,7 @@ for brain in portal.Base_zGetNotGroupedMovementList(\n
continue\n continue\n
specific_reference = transaction.getSourceReference()\n specific_reference = transaction.getSourceReference()\n
mirror_section_title = transaction.getDestinationSectionTitle()\n mirror_section_title = transaction.getDestinationSectionTitle()\n
section_title = transaction.getSourceSectionTitle()\n
else:\n else:\n
if payment_uid and mvt.getDestinationPaymentUid() != payment_uid:\n if payment_uid and mvt.getDestinationPaymentUid() != payment_uid:\n
continue\n continue\n
...@@ -118,6 +120,7 @@ for brain in portal.Base_zGetNotGroupedMovementList(\n ...@@ -118,6 +120,7 @@ for brain in portal.Base_zGetNotGroupedMovementList(\n
continue\n continue\n
specific_reference = transaction.getDestinationReference()\n specific_reference = transaction.getDestinationReference()\n
mirror_section_title = transaction.getSourceSectionTitle()\n mirror_section_title = transaction.getSourceSectionTitle()\n
section_title = transaction.getDestinationSectionTitle()\n
\n \n
\n \n
debit = max(brain.total_quantity, 0)\n debit = max(brain.total_quantity, 0)\n
...@@ -134,18 +137,37 @@ for brain in portal.Base_zGetNotGroupedMovementList(\n ...@@ -134,18 +137,37 @@ for brain in portal.Base_zGetNotGroupedMovementList(\n
if mvt.getStartDate():\n if mvt.getStartDate():\n
brain_date = brain_date.toZone(mvt.getStartDate().timezone())\n brain_date = brain_date.toZone(mvt.getStartDate().timezone())\n
\n \n
line_list.append(\n line = Object(uid=\'new_000\',\n
Object(uid=\'new_000\',\n total_price=brain.total_price,\n
total_price=brain.total_price,\n date=brain.date,\n
date=brain.date,\n Movement_getSpecificReference=specific_reference,\n
Movement_getSpecificReference=specific_reference,\n Movement_getMirrorSectionTitle=mirror_section_title,\n
Movement_getMirrorSectionTitle=mirror_section_title,\n section_title=section_title,\n
debit=debit,\n debit=debit,\n
credit=credit,\n credit=credit,\n
debit_price=debit_price,\n debit_price=debit_price,\n
credit_price=credit_price,\n credit_price=credit_price,\n
Movement_getExplanationTitle=\n Movement_getExplanationTitle=\n
mvt.hasTitle() and mvt.getTitle() or transaction.getTitle()))\n mvt.hasTitle() and mvt.getTitle() or transaction.getTitle())\n
\n
analytic_info = dict()\n
for analytic_column, analytic_column_title in analytic_column_list:\n
if analytic_column == \'project\':\n
if is_source:\n
analytic_info[\'project\'] = mvt.asContext(project_uid=mvt.getSourceProjectUid()).Movement_getProjectTitle()\n
else:\n
analytic_info[\'project\'] = mvt.asContext(project_uid=mvt.getDestinationProjectUid()).Movement_getProjectTitle()\n
elif analytic_column == \'function\':\n
if is_source:\n
analytic_info[\'function\'] = mvt.asContext(function_uid=mvt.getDestinationFunctionUid()).Movement_getFunctionTitle()\n
else:\n
analytic_info[\'function\'] = mvt.asContext(function_uid=mvt.getDestinationFunctionUid()).Movement_getFunctionTitle()\n
else:\n
analytic_info[analytic_column] = mvt.getProperty(analytic_column)\n
\n
line.update(analytic_info)\n
line_list.append(line)\n
\n
\n \n
context.REQUEST.set(\n context.REQUEST.set(\n
\'Account_statNotGroupedAccountingTransactionList.total_debit\', total_debit)\n \'Account_statNotGroupedAccountingTransactionList.total_debit\', total_debit)\n
...@@ -168,7 +190,7 @@ return line_list\n ...@@ -168,7 +190,7 @@ return line_list\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>selection=None, sort_on=[], node_category=None, node_category_strict_membership=None, from_date=None, selection_name=None, function=None, project_uid=None, **kw</string> </value> <value> <string>selection=None, sort_on=[], node_category=None, node_category_strict_membership=None, from_date=None, selection_name=None, function=None, project_uid=None, analytic_column_list=(), **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -188,7 +210,7 @@ return line_list\n ...@@ -188,7 +210,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>
...@@ -202,6 +224,7 @@ return line_list\n ...@@ -202,6 +224,7 @@ return line_list\n
<string>selection_name</string> <string>selection_name</string>
<string>function</string> <string>function</string>
<string>project_uid</string> <string>project_uid</string>
<string>analytic_column_list</string>
<string>kw</string> <string>kw</string>
<string>Products.PythonScripts.standard</string> <string>Products.PythonScripts.standard</string>
<string>Object</string> <string>Object</string>
...@@ -230,8 +253,10 @@ return line_list\n ...@@ -230,8 +253,10 @@ return line_list\n
<string>brain</string> <string>brain</string>
<string>mvt</string> <string>mvt</string>
<string>transaction</string> <string>transaction</string>
<string>is_source</string>
<string>specific_reference</string> <string>specific_reference</string>
<string>mirror_section_title</string> <string>mirror_section_title</string>
<string>section_title</string>
<string>max</string> <string>max</string>
<string>debit</string> <string>debit</string>
<string>_inplacevar_</string> <string>_inplacevar_</string>
...@@ -239,6 +264,12 @@ return line_list\n ...@@ -239,6 +264,12 @@ return line_list\n
<string>debit_price</string> <string>debit_price</string>
<string>credit_price</string> <string>credit_price</string>
<string>brain_date</string> <string>brain_date</string>
<string>line</string>
<string>dict</string>
<string>analytic_info</string>
<string>analytic_column</string>
<string>analytic_column_title</string>
<string>_write_</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -259,6 +290,7 @@ return line_list\n ...@@ -259,6 +290,7 @@ return line_list\n
<none/> <none/>
<none/> <none/>
<none/> <none/>
<tuple/>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -101,6 +101,8 @@ ...@@ -101,6 +101,8 @@
<string>listbox_date</string> <string>listbox_date</string>
<string>listbox_credit_price</string> <string>listbox_credit_price</string>
<string>listbox_debit_price</string> <string>listbox_debit_price</string>
<string>listbox_function</string>
<string>listbox_project</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -172,6 +172,14 @@ ...@@ -172,6 +172,14 @@
<key> <string>editable_columns</string> </key> <key> <string>editable_columns</string> </key>
<value> <value>
<list> <list>
<tuple>
<string>function</string>
<string>function</string>
</tuple>
<tuple>
<string>project</string>
<string>project</string>
</tuple>
<tuple> <tuple>
<string>date</string> <string>date</string>
<string>date</string> <string>date</string>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="StringField" module="Products.Formulator.StandardFields"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_function</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>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>Too much input was given.</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>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</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>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</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>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</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>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</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> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</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>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Function</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: cell.Movement_getFunctionTitle()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="StringField" module="Products.Formulator.StandardFields"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_project</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>
<item>
<key> <string>required_not_found</string> </key>
<value> <string>Input is required but no input given.</string> </value>
</item>
<item>
<key> <string>too_long</string> </key>
<value> <string>Too much input was given.</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>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</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>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</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>
<persistent> <string encoding="base64">AAAAAAAAAAI=</string> </persistent>
</value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</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>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>whitespace_preserve</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> <string></string> </value>
</item>
<item>
<key> <string>description</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_maxwidth</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>display_width</string> </key>
<value> <int>20</int> </value>
</item>
<item>
<key> <string>editable</string> </key>
<value> <int>0</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>max_length</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>required</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>title</string> </key>
<value> <string>Project</string> </value>
</item>
<item>
<key> <string>truncate</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>unicode</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>whitespace_preserve</string> </key>
<value> <int>0</int> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record id="2" aka="AAAAAAAAAAI=">
<pickle>
<tuple>
<global name="TALESMethod" module="Products.Formulator.TALESField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>_text</string> </key>
<value> <string>python: cell.Movement_getProjectTitle()</string> </value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -87,6 +87,8 @@ ...@@ -87,6 +87,8 @@
<string>listbox_total_price</string> <string>listbox_total_price</string>
<string>listbox_running_total_price</string> <string>listbox_running_total_price</string>
<string>listbox_date</string> <string>listbox_date</string>
<string>listbox_credit_price</string>
<string>listbox_debit_price</string>
</list> </list>
</value> </value>
</item> </item>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>editable</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_credit_price</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>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_money_quantity</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list>
<string>editable</string>
</list>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>listbox_debit_price</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>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>editable</string> </key>
<value> <int>0</int> </value>
</item>
<item>
<key> <string>field_id</string> </key>
<value> <string>my_view_mode_money_quantity</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>Base_viewFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -54,8 +54,37 @@ ...@@ -54,8 +54,37 @@
<item> <item>
<key> <string>_body</string> </key> <key> <string>_body</string> </key>
<value> <string>"""Returns the item list of possible projects to use on accounting lines.\n <value> <string>"""Returns the item list of possible projects to use on accounting lines.\n
\n
This script is indented to be used on custom listfields for accounting lines, and on reports.\n
"""\n """\n
return ()\n portal = context.getPortalObject()\n
request = portal.REQUEST\n
\n
# case 1: script is used for reports, we display all project that have been used in accounting.\n
if context.getPortalType() == \'Accounting Transaction Module\':\n
getObject = portal.portal_catalog.getObject\n
search_kw=dict(portal_type=portal.getPortalAccountingMovementTypeList(),\n
group_by=(\'stock.project_uid\',))\n
section_category = request.get(\'your_section_category\',\n
portal.portal_preferences.getPreferredAccountingTransactionSectionCategory())\n
if section_category:\n
section_uid = portal.Base_getSectionUidListForSectionCategory(\n
section_category=section_category,\n
strict_membership=request.get(\'your_section_category_strict\', False))\n
search_kw[\'section_uid\'] = section_uid\n
\n
project_list = []\n
for brain in portal.portal_simulation.getInventoryList(**search_kw):\n
if brain.project_uid:\n
project = getObject(brain.project_uid)\n
project_list.append((project.getTitle(), project.getRelativeUrl(),))\n
project_list.sort(key=lambda x:x[0])\n
return [(\'\', \'\')] + project_list\n
\n
# case 2: script is used on custom listfields.\n
# for now the script has to be customized in such case.\n
# [(x.getTitle(), x.getRelativeUrl()) for x in context.project_module.searchFolder()]\n
return [(\'\', \'\')]\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
...@@ -91,7 +120,24 @@ return ()\n ...@@ -91,7 +120,24 @@ return ()\n
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
<value> <value>
<tuple/> <tuple>
<string>_getattr_</string>
<string>context</string>
<string>portal</string>
<string>request</string>
<string>getObject</string>
<string>dict</string>
<string>search_kw</string>
<string>section_category</string>
<string>False</string>
<string>section_uid</string>
<string>_write_</string>
<string>project_list</string>
<string>_getiter_</string>
<string>_apply_</string>
<string>brain</string>
<string>project</string>
</tuple>
</value> </value>
</item> </item>
</dictionary> </dictionary>
......
...@@ -61,6 +61,7 @@ Base_translateString = container.Base_translateString\n ...@@ -61,6 +61,7 @@ Base_translateString = container.Base_translateString\n
\n \n
portal_type = request[\'portal_type\']\n portal_type = request[\'portal_type\']\n
simulation_state = request[\'simulation_state\']\n simulation_state = request[\'simulation_state\']\n
hide_analytic = request[\'hide_analytic\']\n
at_date = request[\'at_date\'].latestTime()\n at_date = request[\'at_date\'].latestTime()\n
from_date = request.get(\'from_date\') or at_date.earliestTime()\n from_date = request.get(\'from_date\') or at_date.earliestTime()\n
section_uid = context.Base_getSectionUidListForSectionCategory(\n section_uid = context.Base_getSectionUidListForSectionCategory(\n
...@@ -76,6 +77,26 @@ precision = context.account_module.getQuantityPrecisionFromResource(currency)\n ...@@ -76,6 +77,26 @@ precision = context.account_module.getQuantityPrecisionFromResource(currency)\n
# we set the precision in request, for formatting on editable fields\n # we set the precision in request, for formatting on editable fields\n
request.set(\'precision\', precision)\n request.set(\'precision\', precision)\n
\n \n
selection_params = dict(portal_type=portal_type,\n
section_uid=section_uid,\n
precision=precision,\n
simulation_state=simulation_state,\n
at_date=at_date,\n
from_date=from_date,\n
payment_mode=payment_mode,\n
gap_root=gap_root,\n
payment=payment)\n
\n
analytic_column_list = ()\n
if hide_analytic:\n
selection_params[\'group_by\'] = ( \'explanation_uid\',\n
\'mirror_section_uid\',\n
\'payment_uid\',\n
\'node_uid\' )\n
else:\n
analytic_column_list = context.AccountModule_getAnalyticColumnList()\n
selection_params[\'analytic_column_list\'] = analytic_column_list\n
\n
selection_columns = (\n selection_columns = (\n
(\'specific_reference\', \'Transaction Reference\'),\n (\'specific_reference\', \'Transaction Reference\'),\n
(\'date\', \'Date\'),\n (\'date\', \'Date\'),\n
...@@ -83,7 +104,7 @@ selection_columns = (\n ...@@ -83,7 +104,7 @@ selection_columns = (\n
if len(portal_type) > 1:\n if len(portal_type) > 1:\n
selection_columns += (\n selection_columns += (\n
(\'portal_type\', \'Journal Type\'), )\n (\'portal_type\', \'Journal Type\'), )\n
selection_columns += (\n selection_columns += analytic_column_list + (\n
(\'node_title\', \'Account\'),\n (\'node_title\', \'Account\'),\n
(\'mirror_section_title\', \'Third Party\'),\n (\'mirror_section_title\', \'Third Party\'),\n
(\'debit\', \'Debit\'),\n (\'debit\', \'Debit\'),\n
...@@ -95,15 +116,7 @@ return [ReportSection(\n ...@@ -95,15 +116,7 @@ return [ReportSection(\n
selection_name=\'journal_selection\',\n selection_name=\'journal_selection\',\n
form_id=\'AccountingTransactionModule_viewJournalSection\',\n form_id=\'AccountingTransactionModule_viewJournalSection\',\n
selection_columns=selection_columns,\n selection_columns=selection_columns,\n
selection_params=dict(portal_type=portal_type,\n selection_params=selection_params)]\n
section_uid=section_uid,\n
precision=precision,\n
simulation_state=simulation_state,\n
at_date=at_date,\n
from_date=from_date,\n
payment_mode=payment_mode,\n
gap_root=gap_root,\n
payment=payment))]\n
]]></string> </value> ]]></string> </value>
...@@ -151,6 +164,7 @@ return [ReportSection(\n ...@@ -151,6 +164,7 @@ return [ReportSection(\n
<string>_getitem_</string> <string>_getitem_</string>
<string>portal_type</string> <string>portal_type</string>
<string>simulation_state</string> <string>simulation_state</string>
<string>hide_analytic</string>
<string>at_date</string> <string>at_date</string>
<string>from_date</string> <string>from_date</string>
<string>context</string> <string>context</string>
...@@ -160,10 +174,13 @@ return [ReportSection(\n ...@@ -160,10 +174,13 @@ return [ReportSection(\n
<string>gap_root</string> <string>gap_root</string>
<string>currency</string> <string>currency</string>
<string>precision</string> <string>precision</string>
<string>dict</string>
<string>selection_params</string>
<string>analytic_column_list</string>
<string>_write_</string>
<string>selection_columns</string> <string>selection_columns</string>
<string>len</string> <string>len</string>
<string>_inplacevar_</string> <string>_inplacevar_</string>
<string>dict</string>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -63,6 +63,9 @@ extra_kw = dict()\n ...@@ -63,6 +63,9 @@ extra_kw = dict()\n
if payment:\n if payment:\n
extra_kw[\'payment\'] = payment\n extra_kw[\'payment\'] = payment\n
\n \n
if group_by:\n
extra_kw[\'group_by\'] = group_by\n
\n
account_title_cache = dict()\n account_title_cache = dict()\n
def getAccountId(node_relative_url):\n def getAccountId(node_relative_url):\n
if node_relative_url not in account_title_cache:\n if node_relative_url not in account_title_cache:\n
...@@ -71,6 +74,7 @@ def getAccountId(node_relative_url):\n ...@@ -71,6 +74,7 @@ def getAccountId(node_relative_url):\n
return account_title_cache[node_relative_url]\n return account_title_cache[node_relative_url]\n
\n \n
\n \n
# FIXME: this can be passed as node category to getMovementHistoryList\n
account_in_gap_root_cache = dict()\n account_in_gap_root_cache = dict()\n
def isAccountInGapRoot(node_relative_url):\n def isAccountInGapRoot(node_relative_url):\n
if node_relative_url not in account_in_gap_root_cache:\n if node_relative_url not in account_in_gap_root_cache:\n
...@@ -138,16 +142,27 @@ for brain in portal.portal_simulation.getMovementHistoryList(\n ...@@ -138,16 +142,27 @@ for brain in portal.portal_simulation.getMovementHistoryList(\n
title = mvt.hasTitle() and mvt.getTitle() or \'\'\n title = mvt.hasTitle() and mvt.getTitle() or \'\'\n
date = None\n date = None\n
\n \n
line_list.append( Object(uid=\'new_\',\n line = Object(uid=\'new_\',\n
title=title,\n title=title,\n
portal_type=transaction.getTranslatedPortalType(),\n portal_type=transaction.getTranslatedPortalType(),\n
specific_reference=specific_reference,\n specific_reference=specific_reference,\n
mirror_section_title=mirror_section_title,\n mirror_section_title=mirror_section_title,\n
node_title=getAccountId(brain.node_relative_url),\n node_title=getAccountId(brain.node_relative_url),\n
date=date,\n date=date,\n
debit=debit,\n debit=debit,\n
credit=credit))\n credit=credit,)\n
\n analytic_info = dict()\n
for analytic_column, analytic_column_title in analytic_column_list:\n
if analytic_column == \'project\':\n
analytic_info[\'project\'] = brain.Movement_getProjectTitle()\n
elif analytic_column == \'function\':\n
analytic_info[\'function\'] = brain.Movement_getFunctionTitle()\n
else:\n
analytic_info[analytic_column] = mvt.getProperty(analytic_column)\n
\n
line.update(analytic_info)\n
line_list.append(line)\n
\n
request.set(\n request.set(\n
\'AccountingTransactionModule_getJournalSectionLineList.total_debit\',\n \'AccountingTransactionModule_getJournalSectionLineList.total_debit\',\n
total_debit)\n total_debit)\n
...@@ -166,7 +181,7 @@ return line_list\n ...@@ -166,7 +181,7 @@ return line_list\n
</item> </item>
<item> <item>
<key> <string>_params</string> </key> <key> <string>_params</string> </key>
<value> <string>selection, at_date, from_date, portal_type, simulation_state, section_uid, payment_mode=None, payment=None, gap_root=None, **kw</string> </value> <value> <string>selection, at_date, from_date, portal_type, simulation_state, section_uid, payment_mode=None, payment=None, gap_root=None, group_by=None, analytic_column_list=[], **kw</string> </value>
</item> </item>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -186,7 +201,7 @@ return line_list\n ...@@ -186,7 +201,7 @@ return line_list\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>9</int> </value> <value> <int>11</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
...@@ -201,6 +216,8 @@ return line_list\n ...@@ -201,6 +216,8 @@ return line_list\n
<string>payment_mode</string> <string>payment_mode</string>
<string>payment</string> <string>payment</string>
<string>gap_root</string> <string>gap_root</string>
<string>group_by</string>
<string>analytic_column_list</string>
<string>kw</string> <string>kw</string>
<string>Products.PythonScripts.standard</string> <string>Products.PythonScripts.standard</string>
<string>Object</string> <string>Object</string>
...@@ -235,6 +252,10 @@ return line_list\n ...@@ -235,6 +252,10 @@ return line_list\n
<string>title</string> <string>title</string>
<string>date</string> <string>date</string>
<string>None</string> <string>None</string>
<string>line</string>
<string>analytic_info</string>
<string>analytic_column</string>
<string>analytic_column_title</string>
</tuple> </tuple>
</value> </value>
</item> </item>
...@@ -250,6 +271,8 @@ return line_list\n ...@@ -250,6 +271,8 @@ return line_list\n
<none/> <none/>
<none/> <none/>
<none/> <none/>
<none/>
<list/>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -95,8 +95,8 @@ ...@@ -95,8 +95,8 @@
<string>listbox_debit</string> <string>listbox_debit</string>
<string>listbox_date</string> <string>listbox_date</string>
<string>listbox_credit</string> <string>listbox_credit</string>
<string>listbox_credit_quantity</string> <string>listbox_credit_price</string>
<string>listbox_debit_quantity</string> <string>listbox_debit_price</string>
</list> </list>
</value> </value>
</item> </item>
......
...@@ -80,6 +80,7 @@ ...@@ -80,6 +80,7 @@
<string>your_section_category_strict</string> <string>your_section_category_strict</string>
<string>your_from_date</string> <string>your_from_date</string>
<string>your_at_date</string> <string>your_at_date</string>
<string>your_hide_analytic</string>
<string>your_portal_skin</string> <string>your_portal_skin</string>
<string>your_format</string> <string>your_format</string>
<string>your_deferred_style</string> <string>your_deferred_style</string>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="ProxyField" module="Products.ERP5Form.ProxyField"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>delegated_list</string> </key>
<value>
<list/>
</value>
</item>
<item>
<key> <string>id</string> </key>
<value> <string>your_hide_analytic</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>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>tales</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string></string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string></string> </value>
</item>
</dictionary>
</value>
</item>
<item>
<key> <string>values</string> </key>
<value>
<dictionary>
<item>
<key> <string>field_id</string> </key>
<value> <string>your_hide_analytic</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>AccountModule_viewDialogFieldLibrary</string> </value>
</item>
<item>
<key> <string>target</string> </key>
<value> <string>Click to edit the target</string> </value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -316,6 +316,10 @@ ...@@ -316,6 +316,10 @@
<key> <string>alternate_name</string> </key> <key> <string>alternate_name</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>anchor</string> </key>
<value> <int>0</int> </value>
</item>
<item> <item>
<key> <string>columns</string> </key> <key> <string>columns</string> </key>
<value> <value>
...@@ -369,6 +373,12 @@ ...@@ -369,6 +373,12 @@
<key> <string>description</string> </key> <key> <string>description</string> </key>
<value> <string></string> </value> <value> <string></string> </value>
</item> </item>
<item>
<key> <string>display_style_list</string> </key>
<value>
<list/>
</value>
</item>
<item> <item>
<key> <string>domain_root_list</string> </key> <key> <string>domain_root_list</string> </key>
<value> <value>
...@@ -420,6 +430,10 @@ ...@@ -420,6 +430,10 @@
<key> <string>hidden</string> </key> <key> <string>hidden</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item>
<key> <string>hide_rows_on_no_search_criterion</string> </key>
<value> <int>0</int> </value>
</item>
<item> <item>
<key> <string>lines</string> </key> <key> <string>lines</string> </key>
<value> <int>20</int> </value> <value> <int>20</int> </value>
...@@ -460,6 +474,10 @@ ...@@ -460,6 +474,10 @@
<key> <string>report_tree</string> </key> <key> <string>report_tree</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
</item> </item>
<item>
<key> <string>row_css_method</string> </key>
<value> <string></string> </value>
</item>
<item> <item>
<key> <string>search</string> </key> <key> <string>search</string> </key>
<value> <int>0</int> </value> <value> <int>0</int> </value>
...@@ -506,6 +524,12 @@ ...@@ -506,6 +524,12 @@
<key> <string>title</string> </key> <key> <string>title</string> </key>
<value> <string>Transactions</string> </value> <value> <string>Transactions</string> </value>
</item> </item>
<item>
<key> <string>untranslatable_columns</string> </key>
<value>
<list/>
</value>
</item>
<item> <item>
<key> <string>url_columns</string> </key> <key> <string>url_columns</string> </key>
<value> <value>
...@@ -521,11 +545,8 @@ ...@@ -521,11 +545,8 @@
<record id="2" aka="AAAAAAAAAAI="> <record id="2" aka="AAAAAAAAAAI=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="Method" module="Products.Formulator.MethodField"/>
<string>Products.Formulator.MethodField</string> <tuple/>
<string>Method</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
...@@ -540,11 +561,8 @@ ...@@ -540,11 +561,8 @@
<record id="3" aka="AAAAAAAAAAM="> <record id="3" aka="AAAAAAAAAAM=">
<pickle> <pickle>
<tuple> <tuple>
<tuple> <global name="Method" module="Products.Formulator.MethodField"/>
<string>Products.Formulator.MethodField</string> <tuple/>
<string>Method</string>
</tuple>
<none/>
</tuple> </tuple>
</pickle> </pickle>
<pickle> <pickle>
......
<?xml version="1.0"?>
<ZopeData>
<record id="1" aka="AAAAAAAAAAE=">
<pickle>
<tuple>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>movement = context.getObject()\n
function_uid = context.function_uid\n
\n
title_dict = container.REQUEST.get(\n
\'Movement_getFunctionTitle.function_title_dict\') or dict()\n
if function_uid in title_dict:\n
return title_dict[function_uid] \n
\n
if movement.getSourceFunctionUid() == function_uid:\n
return movement.getSourceFunctionTitle()\n
return movement.getDestinationFunctionTitle()\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></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>_getattr_</string>
<string>context</string>
<string>movement</string>
<string>function_uid</string>
<string>container</string>
<string>dict</string>
<string>title_dict</string>
<string>_getitem_</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_getFunctionTitle</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>
<global name="PythonScript" module="Products.PythonScripts.PythonScript"/>
<tuple/>
</tuple>
</pickle>
<pickle>
<dictionary>
<item>
<key> <string>Script_magic</string> </key>
<value> <int>3</int> </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>project_uid = context.project_uid\n
\n
title_dict = container.REQUEST.get(\n
\'Movement_getProjectTitle.project_title_dict\') or dict()\n
if project_uid in title_dict:\n
return title_dict[project_uid]\n
\n
movement = context.getObject()\n
if movement.getSourceProjectUid() == project_uid:\n
return movement.getSourceProjectTitle()\n
return movement.getDestinationProjectTitle()\n
</string> </value>
</item>
<item>
<key> <string>_code</string> </key>
<value>
<none/>
</value>
</item>
<item>
<key> <string>_params</string> </key>
<value> <string></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>_getattr_</string>
<string>context</string>
<string>project_uid</string>
<string>container</string>
<string>dict</string>
<string>title_dict</string>
<string>_getitem_</string>
<string>movement</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_getProjectTitle</string> </value>
</item>
<item>
<key> <string>warnings</string> </key>
<value>
<tuple/>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
...@@ -58,11 +58,12 @@ ...@@ -58,11 +58,12 @@
from Products.ERP5Type.Message import translateString\n from Products.ERP5Type.Message import translateString\n
from Products.ERP5Type.Log import log\n from Products.ERP5Type.Log import log\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
request = portal.REQUEST\n
params = portal.ERP5Accounting_getParams(selection_name=selection_name)\n params = portal.ERP5Accounting_getParams(selection_name=selection_name)\n
\n \n
if params.get(\'precision\', None) is not None:\n if params.get(\'precision\', None) is not None:\n
# listbox editable float fields uses request/precision to format the value.\n # listbox editable float fields uses request/precision to format the value.\n
context.REQUEST.set(\'precision\', params[\'precision\'])\n request.set(\'precision\', params[\'precision\'])\n
\n \n
if not from_date:\n if not from_date:\n
from_date = portal.portal_preferences\\\n from_date = portal.portal_preferences\\\n
...@@ -87,7 +88,6 @@ if node_category:\n ...@@ -87,7 +88,6 @@ if node_category:\n
if not \'parent_portal_type\' in params:\n if not \'parent_portal_type\' in params:\n
params.setdefault(\'portal_type\', portal.getPortalAccountingMovementTypeList())\n params.setdefault(\'portal_type\', portal.getPortalAccountingMovementTypeList())\n
\n \n
\n
# Create the related accouting line list\n # Create the related accouting line list\n
new_result = []\n new_result = []\n
net_balance = 0.0\n net_balance = 0.0\n
...@@ -138,8 +138,10 @@ if from_date or is_pl_account:\n ...@@ -138,8 +138,10 @@ if from_date or is_pl_account:\n
period_openning_balance = 0\n period_openning_balance = 0\n
else:\n else:\n
period_openning_balance = getInventoryAssetPrice(\n period_openning_balance = getInventoryAssetPrice(\n
to_date=period_start_date,\n to_date=min(period_start_date,\n
from_date),\n
**get_inventory_kw)\n **get_inventory_kw)\n
\n
# then all movement between period_start_date and from_date\n # then all movement between period_start_date and from_date\n
previous_total_debit = getInventoryAssetPrice(omit_output=True,\n previous_total_debit = getInventoryAssetPrice(omit_output=True,\n
from_date=period_start_date,\n from_date=period_start_date,\n
...@@ -152,6 +154,9 @@ if from_date or is_pl_account:\n ...@@ -152,6 +154,9 @@ if from_date or is_pl_account:\n
\n \n
if previous_total_credit != 0:\n if previous_total_credit != 0:\n
previous_total_credit = - previous_total_credit\n previous_total_credit = - previous_total_credit\n
\n
if \'group_by\' in kw:\n
params[\'group_by\'] = kw[\'group_by\']\n
\n \n
# Show the previous balance if not empty\n # Show the previous balance if not empty\n
if previous_total_credit != 0 or previous_total_debit != 0:\n if previous_total_credit != 0 or previous_total_debit != 0:\n
...@@ -175,6 +180,8 @@ if from_date or is_pl_account:\n ...@@ -175,6 +180,8 @@ if from_date or is_pl_account:\n
Movement_getMirrorSectionTitle=\'\',\n Movement_getMirrorSectionTitle=\'\',\n
Movement_getNodeGapId=\'\',\n Movement_getNodeGapId=\'\',\n
Movement_getExplanationUrl=lambda **kw: \'\',\n Movement_getExplanationUrl=lambda **kw: \'\',\n
Movement_getFunctionTitle=lambda: \'\',\n
Movement_getProjectTitle=lambda: \'\',\n
Node_statAccountingBalance=\'\',\n Node_statAccountingBalance=\'\',\n
getTranslatedSimulationStateTitle=\'\',\n getTranslatedSimulationStateTitle=\'\',\n
)\n )\n
...@@ -264,6 +271,7 @@ return portal.portal_simulation.getMovementHistoryList(\n ...@@ -264,6 +271,7 @@ return portal.portal_simulation.getMovementHistoryList(\n
<string>_getattr_</string> <string>_getattr_</string>
<string>context</string> <string>context</string>
<string>portal</string> <string>portal</string>
<string>request</string>
<string>params</string> <string>params</string>
<string>None</string> <string>None</string>
<string>_getitem_</string> <string>_getitem_</string>
...@@ -281,6 +289,7 @@ return portal.portal_simulation.getMovementHistoryList(\n ...@@ -281,6 +289,7 @@ return portal.portal_simulation.getMovementHistoryList(\n
<string>getInventoryAssetPrice</string> <string>getInventoryAssetPrice</string>
<string>period_openning_balance</string> <string>period_openning_balance</string>
<string>_apply_</string> <string>_apply_</string>
<string>min</string>
<string>True</string> <string>True</string>
<string>Products.ERP5Type.Document</string> <string>Products.ERP5Type.Document</string>
<string>newTempBase</string> <string>newTempBase</string>
......
1261 1263
\ 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