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
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Bryan Kaperick
erp5
Commits
76ce5e7f
Commit
76ce5e7f
authored
Apr 09, 2014
by
Mame Coumba Sall
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply suggestions by Jerome
parent
e7594cc5
Changes
12
Show whitespace changes
Inline
Side-by-side
Showing
12 changed files
with
32 additions
and
347 deletions
+32
-347
bt5/erp5_project/ActionTemplateItem/portal_types/Project%20Module/close_assignment_dialog.xml
...portal_types/Project%20Module/close_assignment_dialog.xml
+1
-1
bt5/erp5_project/ActionTemplateItem/portal_types/Project/close_assignment_dialog.xml
...lateItem/portal_types/Project/close_assignment_dialog.xml
+2
-2
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_closeRelatedAssigmentListDialog/listbox.xml
...ProjectModule_closeRelatedAssigmentListDialog/listbox.xml
+0
-288
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_getDestinationProjectRelatedAssignmentList.xml
...jectModule_getDestinationProjectRelatedAssignmentList.xml
+3
-29
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_viewCloseRelatedAssigmentListDialog.xml
...ect/ProjectModule_viewCloseRelatedAssigmentListDialog.xml
+7
-4
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Project_closeRelatedAssignmentList.xml
...skins/erp5_project/Project_closeRelatedAssignmentList.xml
+7
-2
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Project_getDestinationProjectRelatedAssignmentList.xml
...ct/Project_getDestinationProjectRelatedAssignmentList.xml
+4
-13
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Project_viewCloseRelatedAssigmentListDialog.xml
...5_project/Project_viewCloseRelatedAssigmentListDialog.xml
+3
-3
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Project_viewCloseRelatedAssigmentListDialog/listbox.xml
...t/Project_viewCloseRelatedAssigmentListDialog/listbox.xml
+2
-2
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Project_viewCloseRelatedAssigmentListDialog/listbox_start_date.xml
...iewCloseRelatedAssigmentListDialog/listbox_start_date.xml
+1
-1
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Project_viewCloseRelatedAssigmentListDialog/listbox_stop_date.xml
...viewCloseRelatedAssigmentListDialog/listbox_stop_date.xml
+1
-1
bt5/erp5_project/bt/revision
bt5/erp5_project/bt/revision
+1
-1
No files found.
bt5/erp5_project/ActionTemplateItem/portal_types/Project%20Module/close_assignment_dialog.xml
View file @
76ce5e7f
...
...
@@ -73,7 +73,7 @@
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/ProjectModule_
c
loseRelatedAssigmentListDialog
</string>
</value>
<value>
<string>
string:${object_url}/ProjectModule_
viewC
loseRelatedAssigmentListDialog
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
bt5/erp5_project/ActionTemplateItem/portal_types/Project/close_assignment_dialog.xml
View file @
76ce5e7f
...
...
@@ -54,7 +54,7 @@
</item>
<item>
<key>
<string>
priority
</string>
</key>
<value>
<float>
6.5
</float>
</value>
<value>
<float>
13.0
</float>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
...
...
@@ -75,7 +75,7 @@
<dictionary>
<item>
<key>
<string>
text
</string>
</key>
<value>
<string>
string:${object_url}/
ClosedProject_closeRelatedAssigments
Dialog
</string>
</value>
<value>
<string>
string:${object_url}/
Project_viewCloseRelatedAssigmentList
Dialog
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_closeRelatedAssigmentListDialog/listbox.xml
deleted
100644 → 0
View file @
e7594cc5
<?xml version="1.0"?>
<ZopeData>
<record
id=
"1"
aka=
"AAAAAAAAAAE="
>
<pickle>
<global
name=
"ProxyField"
module=
"Products.ERP5Form.ProxyField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
delegated_list
</string>
</key>
<value>
<list>
<string>
all_columns
</string>
<string>
columns
</string>
<string>
editable_columns
</string>
<string>
list_method
</string>
<string>
portal_types
</string>
<string>
report_root_list
</string>
<string>
report_tree
</string>
<string>
select
</string>
<string>
selection_name
</string>
<string>
sort_columns
</string>
<string>
stat_method
</string>
<string>
title
</string>
</list>
</value>
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
listbox
</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>
Base_viewSearchResultList
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
all_columns
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
all_editable_columns
</string>
</key>
<value>
<list>
<tuple>
<string>
int_index
</string>
<string>
Index
</string>
</tuple>
<tuple>
<string>
quantity
</string>
<string>
Estimated Time
</string>
</tuple>
<tuple>
<string>
start_date
</string>
<string>
Begin
</string>
</tuple>
<tuple>
<string>
stop_date
</string>
<string>
End
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
columns
</string>
</key>
<value>
<list>
<tuple>
<string>
destination_project_title
</string>
<string>
Project
</string>
</tuple>
<tuple>
<string>
parent_title
</string>
<string>
Assignee
</string>
</tuple>
<tuple>
<string>
destination_title
</string>
<string>
Organisation
</string>
</tuple>
<tuple>
<string>
site_translated_title
</string>
<string>
Site
</string>
</tuple>
<tuple>
<string>
group_translated_title
</string>
<string>
Group
</string>
</tuple>
<tuple>
<string>
function_translated_title
</string>
<string>
Function
</string>
</tuple>
<tuple>
<string>
activity_translated_title
</string>
<string>
Activity
</string>
</tuple>
<tuple>
<string>
role_translated_title
</string>
<string>
Role
</string>
</tuple>
<tuple>
<string>
start_date
</string>
<string>
Start Date
</string>
</tuple>
<tuple>
<string>
stop_date
</string>
<string>
Stop Date
</string>
</tuple>
<tuple>
<string>
translated_validation_state_title
</string>
<string>
State
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
editable_columns
</string>
</key>
<value>
<list>
<tuple>
<string>
start_date
</string>
<string>
Begin Date
</string>
</tuple>
<tuple>
<string>
stop_date
</string>
<string>
End Date
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
field_id
</string>
</key>
<value>
<string>
my_view_mode_listbox
</string>
</value>
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
Base_viewFieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
list_method
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAI=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
portal_types
</string>
</key>
<value>
<list>
<tuple>
<string>
Assignment
</string>
<string>
Assignment
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
report_root_list
</string>
</key>
<value>
<list>
<tuple>
<string>
project_project_domain
</string>
<string>
Project
</string>
</tuple>
</list>
</value>
</item>
<item>
<key>
<string>
report_tree
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
select
</string>
</key>
<value>
<int>
1
</int>
</value>
</item>
<item>
<key>
<string>
selection_name
</string>
</key>
<value>
<string>
project_assignment_selection
</string>
</value>
</item>
<item>
<key>
<string>
separate_tree_data
</string>
</key>
<value>
<int>
0
</int>
</value>
</item>
<item>
<key>
<string>
sort_columns
</string>
</key>
<value>
<list/>
</value>
</item>
<item>
<key>
<string>
stat_method
</string>
</key>
<value>
<persistent>
<string
encoding=
"base64"
>
AAAAAAAAAAM=
</string>
</persistent>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
<value>
<string>
Click to edit the target
</string>
</value>
</item>
<item>
<key>
<string>
title
</string>
</key>
<value>
<string>
Related Assignments
</string>
</value>
</item>
</dictionary>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"2"
aka=
"AAAAAAAAAAI="
>
<pickle>
<global
name=
"Method"
module=
"Products.Formulator.MethodField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
method_name
</string>
</key>
<value>
<string>
ProjectModule_getDestinationProjectRelatedAssignmentList
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
<record
id=
"3"
aka=
"AAAAAAAAAAM="
>
<pickle>
<global
name=
"Method"
module=
"Products.Formulator.MethodField"
/>
</pickle>
<pickle>
<dictionary>
<item>
<key>
<string>
method_name
</string>
</key>
<value>
<string>
portal_catalog
</string>
</value>
</item>
</dictionary>
</pickle>
</record>
</ZopeData>
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_getDestinationProjectRelatedAssignmentList.xml
View file @
76ce5e7f
...
...
@@ -52,36 +52,10 @@
<key>
<string>
_body
</string>
</key>
<value>
<string>
from Products.ZSQLCatalog.SQLCatalog import Query\n
closed_project_list = context.portal_catalog(portal_type=\'Project\', validation_state=\'invalidated\')\n
assignment_list = []\n
a
ll_a
ssignment_list = []\n
for project in closed_project_list:\n
destination_project_uid_list = [x.uid for x in context.portal_catalog(\n
relative_url=\'%s/%%\' % project.getRelativeUrl())] + [project.getUid()]\n
sql_kw = {}\n
if kw.has_key(\'from_date\') and kw[\'from_date\'] is not None:\n
query_kw = {\'delivery.start_date\' : kw[\'from_date\'],\n
\'range\' : \'min\'}\n
sql_kw[\'delivery.start_date\'] = Query(**query_kw)\n
if kw.has_key(\'at_date\') and kw[\'at_date\'] is not None:\n
query_kw = {\'delivery.stop_date\' : kw[\'at_date\'],\n
\'range\' : \'ngt\'}\n
sql_kw[\'delivery.stop_date\'] = Query(**query_kw)\n
assignment_list.extend([x.getObject() for x in \\\n
context.portal_catalog(\n
portal_type=\'Assignment\',\n
destination_project_uid = destination_project_uid_list,\n
validation_state = \'open\',\n
**sql_kw)])\n
\n
\n
def sortAssignment(a, b):\n
result = cmp(a.getStartDate(), b.getStartDate())\n
if result == 0:\n
result = cmp(a.getTitle(), b.getTitle())\n
return result\n
\n
assignment_list.sort(sortAssignment)\n
\n
return assignment_list\n
all_assignment_list.extend(project.Project_getDestinationProjectRelatedAssignmentList(**kw))\n
return all_assignment_list\n
</string>
</value>
</item>
<item>
...
...
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_
c
loseRelatedAssigmentListDialog.xml
→
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/ProjectModule_
viewC
loseRelatedAssigmentListDialog.xml
View file @
76ce5e7f
...
...
@@ -35,7 +35,7 @@
</item>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
Project_closeRelatedAssignment
s
</string>
</value>
<value>
<string>
Project_closeRelatedAssignment
List
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
...
...
@@ -88,7 +88,10 @@
<item>
<key>
<string>
hidden
</string>
</key>
<value>
<list/>
<list>
<string>
listbox_start_date
</string>
<string>
listbox_stop_date
</string>
</list>
</value>
</item>
<item>
...
...
@@ -108,7 +111,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ProjectModule_
c
loseRelatedAssigmentListDialog
</string>
</value>
<value>
<string>
ProjectModule_
viewC
loseRelatedAssigmentListDialog
</string>
</value>
</item>
<item>
<key>
<string>
method
</string>
</key>
...
...
@@ -116,7 +119,7 @@
</item>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
ClosedProject_closeRelatedAssigments
Dialog
</string>
</value>
<value>
<string>
ProjectModule_viewCloseRelatedAssigmentList
Dialog
</string>
</value>
</item>
<item>
<key>
<string>
pt
</string>
</key>
...
...
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Project_closeRelatedAssignment
s
.xml
→
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Project_closeRelatedAssignment
List
.xml
View file @
76ce5e7f
...
...
@@ -51,13 +51,18 @@
<item>
<key>
<string>
_body
</string>
</key>
<value>
<string>
from Products.ERP5Type.Message import translateString\n
from zExceptions import Unauthorized\n
portal = context.getPortalObject()\n
\n
message = translateString("Selected Assignments are now invalidated.")\n
for line in listbox:\n
if line.has_key(\'listbox_key\') and line[\'listbox_selected\'] is True:\n
assignment = portal.restrictedTraverse(line[\'listbox_key\'])\n
try:\n
portal.portal_workflow.doActionFor(assignment, \'close_action\')\n
except:\n
return context.Base_redirect(\'view\',\n
keep_items={\'portal_status_message\': "You are not allowed to close assignments"}, **kw)\n
\n
return context.Base_redirect(\'view\',\n
keep_items={\'portal_status_message\': message}, **kw)\n
...
...
@@ -69,7 +74,7 @@ return context.Base_redirect(\'view\',\n
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
Project_closeRelatedAssignment
s
</string>
</value>
<value>
<string>
Project_closeRelatedAssignment
List
</string>
</value>
</item>
</dictionary>
</pickle>
...
...
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/Project_getDestinationProjectRelatedAssignmentList.xml
View file @
76ce5e7f
...
...
@@ -56,31 +56,22 @@
from Products.ZSQLCatalog.SQLCatalog import Query\n
\n
sql_kw = {}\n
if kw.
has_key(\'from_date\') and kw[\'from_date\']
is not None:\n
if kw.
get(\'from_date\')
is not None:\n
query_kw = {\'delivery.start_date\' : kw[\'from_date\'],\n
\'range\' : \'min\'}\n
sql_kw[\'delivery.start_date\'] = Query(**query_kw)\n
if kw.
has_key(\'at_date\') and kw[\'at_date\']
is not None:\n
if kw.
get(\'at_date\')
is not None:\n
query_kw = {\'delivery.stop_date\' : kw[\'at_date\'],\n
\'range\' : \'ngt\'}\n
sql_kw[\'delivery.stop_date\'] = Query(**query_kw)\n
assignment_list = ([x.getObject() for x in \\\n
context.portal_catalog(selection=selection, selection_report=selection_report, \n
portal_type=\'Assignment\',\n
destination_project_uid = destination_project_uid_list,\n
de
fault_de
stination_project_uid = destination_project_uid_list,\n
validation_state = \'open\',\n
**sql_kw)])\n
\n
\n
def sortAssignment(a, b):\n
result = cmp(a.getStartDate(), b.getStartDate())\n
if result == 0:\n
result = cmp(a.getTitle(), b.getTitle())\n
return result\n
\n
assignment_list.sort(sortAssignment)\n
\n
return assignment_list\n
return sorted(assignment_list, key=lambda assignment: (assignment.getParentValue().getTitle(), assignment.getStartDate()))\n
</string>
</value>
</item>
<item>
...
...
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/
ClosedProject_closeRelatedAssigments
Dialog.xml
→
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/
Project_viewCloseRelatedAssigmentList
Dialog.xml
View file @
76ce5e7f
...
...
@@ -35,7 +35,7 @@
</item>
<item>
<key>
<string>
action
</string>
</key>
<value>
<string>
Project_closeRelatedAssignment
s
</string>
</value>
<value>
<string>
Project_closeRelatedAssignment
List
</string>
</value>
</item>
<item>
<key>
<string>
description
</string>
</key>
...
...
@@ -111,7 +111,7 @@
</item>
<item>
<key>
<string>
id
</string>
</key>
<value>
<string>
ClosedProject_closeRelatedAssigments
Dialog
</string>
</value>
<value>
<string>
Project_viewCloseRelatedAssigmentList
Dialog
</string>
</value>
</item>
<item>
<key>
<string>
method
</string>
</key>
...
...
@@ -119,7 +119,7 @@
</item>
<item>
<key>
<string>
name
</string>
</key>
<value>
<string>
ClosedProject_closeRelatedAssigments
Dialog
</string>
</value>
<value>
<string>
Project_viewCloseRelatedAssigmentList
Dialog
</string>
</value>
</item>
<item>
<key>
<string>
pt
</string>
</key>
...
...
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/
ClosedProject_closeRelatedAssigments
Dialog/listbox.xml
→
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/
Project_viewCloseRelatedAssigmentList
Dialog/listbox.xml
View file @
76ce5e7f
...
...
@@ -149,11 +149,11 @@
</tuple>
<tuple>
<string>
start_date
</string>
<string>
Start
Date
</string>
<string>
Begin
Date
</string>
</tuple>
<tuple>
<string>
stop_date
</string>
<string>
Stop
Date
</string>
<string>
End
Date
</string>
</tuple>
<tuple>
<string>
translated_validation_state_title
</string>
...
...
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/
ClosedProject_closeRelatedAssigments
Dialog/listbox_start_date.xml
→
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/
Project_viewCloseRelatedAssigmentList
Dialog/listbox_start_date.xml
View file @
76ce5e7f
...
...
@@ -81,7 +81,7 @@
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
TaskReport_view
FieldLibrary
</string>
</value>
<value>
<string>
Base_viewProject
FieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
...
...
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/
ClosedProject_closeRelatedAssigments
Dialog/listbox_stop_date.xml
→
bt5/erp5_project/SkinTemplateItem/portal_skins/erp5_project/
Project_viewCloseRelatedAssigmentList
Dialog/listbox_stop_date.xml
View file @
76ce5e7f
...
...
@@ -81,7 +81,7 @@
</item>
<item>
<key>
<string>
form_id
</string>
</key>
<value>
<string>
TaskReport_view
FieldLibrary
</string>
</value>
<value>
<string>
Base_viewProject
FieldLibrary
</string>
</value>
</item>
<item>
<key>
<string>
target
</string>
</key>
...
...
bt5/erp5_project/bt/revision
View file @
76ce5e7f
838
\ No newline at end of file
839
\ No newline at end of file
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