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
Matevz Golob
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
Expand all
Hide 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
This diff is collapsed.
Click to expand it.
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
portal.portal_workflow.doActionFor(assignment, \'close_action\')\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