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

fix some regressions in reports

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@36199 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 41304bac
...@@ -194,6 +194,7 @@ account_type_to_group_by_mirror_section = [\n ...@@ -194,6 +194,7 @@ account_type_to_group_by_mirror_section = [\n
\n \n
if gap_list or gap_root:\n if gap_list or gap_root:\n
params[\'node_category\'] = gap_list or gap_root\n params[\'node_category\'] = gap_list or gap_root\n
default_selection_params[\'node_category\'] = gap_list or gap_root\n
\n \n
report_section_list = []\n report_section_list = []\n
\n \n
......
...@@ -56,6 +56,7 @@ ...@@ -56,6 +56,7 @@
<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 \n
This script is indented to be used on custom listfields for accounting lines, and on reports.\n This script is indented to be used on custom listfields for accounting lines, and on reports.\n
If this script returns an empty list, it means that reports by project are disabled.\n
"""\n """\n
portal = context.getPortalObject()\n portal = context.getPortalObject()\n
request = portal.REQUEST\n request = portal.REQUEST\n
...@@ -79,6 +80,8 @@ if context.getPortalType() == \'Accounting Transaction Module\':\n ...@@ -79,6 +80,8 @@ if context.getPortalType() == \'Accounting Transaction Module\':\n
project = getObject(brain.project_uid)\n project = getObject(brain.project_uid)\n
project_list.append((project.getTitle(), project.getRelativeUrl(),))\n project_list.append((project.getTitle(), project.getRelativeUrl(),))\n
project_list.sort(key=lambda x:x[0])\n project_list.sort(key=lambda x:x[0])\n
if not project_list:\n
return [] # returning an empty list, not to add project column on reports\n
return [(\'\', \'\')] + project_list\n return [(\'\', \'\')] + project_list\n
\n \n
# case 2: script is used on custom listfields.\n # case 2: script is used on custom listfields.\n
......
...@@ -65,6 +65,7 @@ if payment:\n ...@@ -65,6 +65,7 @@ if payment:\n
\n \n
if group_by:\n 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
\n \n
account_title_cache = dict()\n account_title_cache = dict()\n
def getAccountId(node_relative_url):\n def getAccountId(node_relative_url):\n
...@@ -230,6 +231,7 @@ return line_list\n ...@@ -230,6 +231,7 @@ return line_list\n
<string>dict</string> <string>dict</string>
<string>extra_kw</string> <string>extra_kw</string>
<string>_write_</string> <string>_write_</string>
<string>True</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>
......
1263 1268
\ 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