Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Aaron Chen
erp5
Commits
08cea86c
Commit
08cea86c
authored
Oct 21, 2014
by
Jérome Perrin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Research Item Report: various fixes
parent
84ed891f
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
19 additions
and
16 deletions
+19
-16
bt5/erp5_research_item/SkinTemplateItem/portal_skins/erp5_research_item/ResearchItemModule_callResearchSummaryReport.xml
...rch_item/ResearchItemModule_callResearchSummaryReport.xml
+19
-16
No files found.
bt5/erp5_research_item/SkinTemplateItem/portal_skins/erp5_research_item/ResearchItemModule_callResearchSummaryReport.xml
View file @
08cea86c
...
...
@@ -53,6 +53,8 @@
<value>
<string
encoding=
"cdata"
>
<![CDATA[
inventory_kw = {}\n
if multiplier in (None, \'\'):\n
multiplier = 1.0\n
inventory_kw["at_date"] = at_date\n
inventory_kw["from_date"] = from_date\n
inventory_kw["quantity"] = "<0"\n
...
...
@@ -62,7 +64,6 @@ if multiplier is None:\n
multiplier = 1\n
\n
portal = context.getPortalObject()\n
\n
simulation_state_set = set(simulation_state_list)\n
# We will use inventory API in order to find all quantities\n
before_confirmed_task_state_set = set(portal.getPortalPlannedOrderStateList() + \\\n
...
...
@@ -110,14 +111,14 @@ def getColumnUrl(brain=None, column_id=None, **kw):\n
absolute_url = portal.absolute_url()\n
\n
if len(summary_dict):\n
for person in portal.portal_catalog(portal_type=
"Person"
, uid=summary_dict.keys(), select_list=["title"]):\n
for person in portal.portal_catalog(portal_type=
("Person", "Organisation")
, uid=summary_dict.keys(), select_list=["title"]):\n
person_title_dict[person.uid] = person.title\n
for person_uid in summary_dict.keys():\n
person_kw = summary_dict[person_uid]\n
person_kw["source_title"] = person_title_dict[person_uid]\n
person = portal.person_module.newContent(temp_object=1, **person_kw)\n
for item_url in summary_dict[person_uid].keys():\n
task_report_module_url = "%s/task_report_module/view?reset:int=1&default_source_uid=%s" % (absolute_url, person_uid)\n
task_report_module_url = "%s/task_report_module/view?reset:int=1&default_source_uid=%s
&title=%%
" % (absolute_url, person_uid)\n
if item_url == "None":\n
task_report_module_url += "&child_aggregate_relative_url=%%3dNULL&left_join_list=child_aggregate_relative_url&journal_relative_url=journal/%s" % \\\n
(journal, )\n
...
...
@@ -128,6 +129,7 @@ if len(summary_dict):\n
person.setProperty("getColumnUrl", getColumnUrl)\n
listbox_line_list.append(person)\n
\n
listbox_line_list.sort(key=lambda x: x.getProperty("source_title"))\n
# now add an extra line for total\n
person = portal.person_module.newContent(temp_object=1, source_title="Total", **total_project_dict)\n
listbox_line_list.append(person)\n
...
...
@@ -139,8 +141,10 @@ if item_url_set:\n
item_title_dict["None"] = "undefined"\n
\n
# define which property to display in columns\n
column_list = [("source_title", "Worker")]\n
for item_url, item_title in item_title_dict.items():\n
column_list = [("source_title", "Worker"),\n
("None", "Undefined"), ]\n
for item_url, item_title in sorted(item_title_dict.items(), key=lambda url_title: url_title[1]):\n
if item_url != \'None\':\n
column_list.append((item_url, item_title))\n
column_list.append(("total", "Total"))\n
\n
...
...
@@ -149,8 +153,7 @@ column_url_script_list = []\n
for item_url in item_title_dict.keys():\n
column_url_script_list.append((item_url, "getColumnUrl"))\n
\n
context_kw = {}\n
context_kw.update(column_list=column_list,\n
context = context.asContext(column_list=column_list,\n
at_date=at_date,\n
from_date=from_date,\n
simulation_state_list=simulation_state_list,\n
...
...
@@ -158,7 +161,7 @@ context_kw.update(column_list=column_list,\n
journal=journal,\n
multiplier=multiplier,\n
listbox_line_list=listbox_line_list)\n
context = context.getObject().asContext(**context_kw)
\n
\n
if batch_mode:\n
return context\n
return context.ResearchItemModule_viewResearchSummaryReportData()\n
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment