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

support journal by project


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@37351 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 55780a02
......@@ -62,6 +62,7 @@ Base_translateString = container.Base_translateString\n
portal_type = request[\'portal_type\']\n
simulation_state = request[\'simulation_state\']\n
hide_analytic = request[\'hide_analytic\']\n
project = request.get(\'project\', None)\n
at_date = request[\'at_date\'].latestTime()\n
from_date = request.get(\'from_date\') or at_date.earliestTime()\n
section_uid = context.Base_getSectionUidListForSectionCategory(\n
......@@ -87,6 +88,13 @@ selection_params = dict(portal_type=portal_type,\n
gap_root=gap_root,\n
payment=payment)\n
\n
if project:\n
if project == \'None\':\n
selection_params[\'project_uid\'] = project\n
else:\n
selection_params[\'project_uid\'] = \\\n
context.getPortalObject().restrictedTraverse(project).getUid()\n
\n
analytic_column_list = ()\n
if hide_analytic:\n
selection_params[\'group_by\'] = ( \'explanation_uid\',\n
......@@ -166,6 +174,8 @@ return [ReportSection(\n
<string>portal_type</string>
<string>simulation_state</string>
<string>hide_analytic</string>
<string>None</string>
<string>project</string>
<string>at_date</string>
<string>from_date</string>
<string>context</string>
......@@ -177,8 +187,8 @@ return [ReportSection(\n
<string>precision</string>
<string>dict</string>
<string>selection_params</string>
<string>analytic_column_list</string>
<string>_write_</string>
<string>analytic_column_list</string>
<string>selection_columns</string>
<string>len</string>
<string>_inplacevar_</string>
......
......@@ -53,7 +53,8 @@
</item>
<item>
<key> <string>_body</string> </key>
<value> <string>from Products.PythonScripts.standard import Object\n
<value> <string>from Products.ZSQLCatalog.SQLCatalog import Query\n
from Products.PythonScripts.standard import Object\n
request = container.REQUEST\n
portal = context.getPortalObject()\n
\n
......@@ -67,6 +68,12 @@ if group_by:\n
extra_kw[\'group_by\'] = group_by\n
extra_kw[\'ignore_group_by\'] = True\n
\n
if project_uid:\n
if project_uid == \'None\':\n
extra_kw[\'project_uid\'] = Query(project_uid=None)\n
else:\n
extra_kw[\'project_uid\'] = project_uid\n
\n
account_title_cache = dict()\n
def getAccountId(node_relative_url):\n
if node_relative_url not in account_title_cache:\n
......@@ -185,7 +192,7 @@ return line_list\n
</item>
<item>
<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, group_by=None, analytic_column_list=[], **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=[], project_uid=None, **kw</string> </value>
</item>
<item>
<key> <string>errors</string> </key>
......@@ -205,7 +212,7 @@ return line_list\n
<dictionary>
<item>
<key> <string>co_argcount</string> </key>
<value> <int>11</int> </value>
<value> <int>12</int> </value>
</item>
<item>
<key> <string>co_varnames</string> </key>
......@@ -222,7 +229,10 @@ return line_list\n
<string>gap_root</string>
<string>group_by</string>
<string>analytic_column_list</string>
<string>project_uid</string>
<string>kw</string>
<string>Products.ZSQLCatalog.SQLCatalog</string>
<string>Query</string>
<string>Products.PythonScripts.standard</string>
<string>Object</string>
<string>_getattr_</string>
......@@ -235,6 +245,7 @@ return line_list\n
<string>extra_kw</string>
<string>_write_</string>
<string>True</string>
<string>None</string>
<string>account_title_cache</string>
<string>getAccountId</string>
<string>account_in_gap_root_cache</string>
......@@ -257,7 +268,6 @@ return line_list\n
<string>transaction_reference</string>
<string>title</string>
<string>date</string>
<string>None</string>
<string>line</string>
<string>analytic_info</string>
<string>analytic_column</string>
......@@ -279,6 +289,7 @@ return line_list\n
<none/>
<none/>
<list/>
<none/>
</tuple>
</value>
</item>
......
......@@ -78,6 +78,7 @@
<list>
<string>your_section_category</string>
<string>your_section_category_strict</string>
<string>your_project</string>
<string>your_from_date</string>
<string>your_at_date</string>
<string>your_hide_analytic</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_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>
</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_project</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>
......@@ -93,6 +93,7 @@
<value>
<list>
<string>your_section_category</string>
<string>your_project</string>
<string>your_payment</string>
<string>your_payment_mode</string>
<string>your_currency</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_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>
</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_project</string> </value>
</item>
<item>
<key> <string>form_id</string> </key>
<value> <string>AccountModule_viewReportFieldLibrary</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>
1320
\ No newline at end of file
1321
\ 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