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
\n
if 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
report_section_list = []\n
\n
......
......@@ -56,6 +56,7 @@
<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
If this script returns an empty list, it means that reports by project are disabled.\n
"""\n
portal = context.getPortalObject()\n
request = portal.REQUEST\n
......@@ -79,6 +80,8 @@ if context.getPortalType() == \'Accounting Transaction Module\':\n
project = getObject(brain.project_uid)\n
project_list.append((project.getTitle(), project.getRelativeUrl(),))\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
\n
# case 2: script is used on custom listfields.\n
......
......@@ -65,6 +65,7 @@ if payment:\n
\n
if group_by:\n
extra_kw[\'group_by\'] = group_by\n
extra_kw[\'ignore_group_by\'] = True\n
\n
account_title_cache = dict()\n
def getAccountId(node_relative_url):\n
......@@ -230,6 +231,7 @@ return line_list\n
<string>dict</string>
<string>extra_kw</string>
<string>_write_</string>
<string>True</string>
<string>account_title_cache</string>
<string>getAccountId</string>
<string>account_in_gap_root_cache</string>
......
1263
\ No newline at end of file
1268
\ 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