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 ...@@ -62,6 +62,7 @@ Base_translateString = container.Base_translateString\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 hide_analytic = request[\'hide_analytic\']\n
project = request.get(\'project\', None)\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
...@@ -87,6 +88,13 @@ selection_params = dict(portal_type=portal_type,\n ...@@ -87,6 +88,13 @@ selection_params = dict(portal_type=portal_type,\n
gap_root=gap_root,\n gap_root=gap_root,\n
payment=payment)\n payment=payment)\n
\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 analytic_column_list = ()\n
if hide_analytic:\n if hide_analytic:\n
selection_params[\'group_by\'] = ( \'explanation_uid\',\n selection_params[\'group_by\'] = ( \'explanation_uid\',\n
...@@ -166,6 +174,8 @@ return [ReportSection(\n ...@@ -166,6 +174,8 @@ return [ReportSection(\n
<string>portal_type</string> <string>portal_type</string>
<string>simulation_state</string> <string>simulation_state</string>
<string>hide_analytic</string> <string>hide_analytic</string>
<string>None</string>
<string>project</string>
<string>at_date</string> <string>at_date</string>
<string>from_date</string> <string>from_date</string>
<string>context</string> <string>context</string>
...@@ -177,8 +187,8 @@ return [ReportSection(\n ...@@ -177,8 +187,8 @@ return [ReportSection(\n
<string>precision</string> <string>precision</string>
<string>dict</string> <string>dict</string>
<string>selection_params</string> <string>selection_params</string>
<string>analytic_column_list</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>
......
...@@ -53,7 +53,8 @@ ...@@ -53,7 +53,8 @@
</item> </item>
<item> <item>
<key> <string>_body</string> </key> <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 request = container.REQUEST\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
\n \n
...@@ -67,6 +68,12 @@ if group_by:\n ...@@ -67,6 +68,12 @@ if group_by:\n
extra_kw[\'group_by\'] = group_by\n extra_kw[\'group_by\'] = group_by\n
extra_kw[\'ignore_group_by\'] = True\n extra_kw[\'ignore_group_by\'] = True\n
\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 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
...@@ -185,7 +192,7 @@ return line_list\n ...@@ -185,7 +192,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, 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>
<item> <item>
<key> <string>errors</string> </key> <key> <string>errors</string> </key>
...@@ -205,7 +212,7 @@ return line_list\n ...@@ -205,7 +212,7 @@ return line_list\n
<dictionary> <dictionary>
<item> <item>
<key> <string>co_argcount</string> </key> <key> <string>co_argcount</string> </key>
<value> <int>11</int> </value> <value> <int>12</int> </value>
</item> </item>
<item> <item>
<key> <string>co_varnames</string> </key> <key> <string>co_varnames</string> </key>
...@@ -222,7 +229,10 @@ return line_list\n ...@@ -222,7 +229,10 @@ return line_list\n
<string>gap_root</string> <string>gap_root</string>
<string>group_by</string> <string>group_by</string>
<string>analytic_column_list</string> <string>analytic_column_list</string>
<string>project_uid</string>
<string>kw</string> <string>kw</string>
<string>Products.ZSQLCatalog.SQLCatalog</string>
<string>Query</string>
<string>Products.PythonScripts.standard</string> <string>Products.PythonScripts.standard</string>
<string>Object</string> <string>Object</string>
<string>_getattr_</string> <string>_getattr_</string>
...@@ -235,6 +245,7 @@ return line_list\n ...@@ -235,6 +245,7 @@ return line_list\n
<string>extra_kw</string> <string>extra_kw</string>
<string>_write_</string> <string>_write_</string>
<string>True</string> <string>True</string>
<string>None</string>
<string>account_title_cache</string> <string>account_title_cache</string>
<string>getAccountId</string> <string>getAccountId</string>
<string>account_in_gap_root_cache</string> <string>account_in_gap_root_cache</string>
...@@ -257,7 +268,6 @@ return line_list\n ...@@ -257,7 +268,6 @@ return line_list\n
<string>transaction_reference</string> <string>transaction_reference</string>
<string>title</string> <string>title</string>
<string>date</string> <string>date</string>
<string>None</string>
<string>line</string> <string>line</string>
<string>analytic_info</string> <string>analytic_info</string>
<string>analytic_column</string> <string>analytic_column</string>
...@@ -279,6 +289,7 @@ return line_list\n ...@@ -279,6 +289,7 @@ return line_list\n
<none/> <none/>
<none/> <none/>
<list/> <list/>
<none/>
</tuple> </tuple>
</value> </value>
</item> </item>
......
...@@ -78,6 +78,7 @@ ...@@ -78,6 +78,7 @@
<list> <list>
<string>your_section_category</string> <string>your_section_category</string>
<string>your_section_category_strict</string> <string>your_section_category_strict</string>
<string>your_project</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_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 @@ ...@@ -93,6 +93,7 @@
<value> <value>
<list> <list>
<string>your_section_category</string> <string>your_section_category</string>
<string>your_project</string>
<string>your_payment</string> <string>your_payment</string>
<string>your_payment_mode</string> <string>your_payment_mode</string>
<string>your_currency</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 1321
\ 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