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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Papa Tamsir Kane
erp5
Commits
5060228a
Commit
5060228a
authored
Sep 04, 2017
by
Papa Tamsir Kane
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
erp5_decision: Remove unnecessary comments
parent
eda07473
Changes
5
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
2 additions
and
44 deletions
+2
-44
bt5/erp5_decision/SkinTemplateItem/portal_skins/erp5_decision/Decision_afterGeneration.py
...em/portal_skins/erp5_decision/Decision_afterGeneration.py
+0
-13
bt5/erp5_decision/SkinTemplateItem/portal_skins/erp5_decision/Decision_getSourceDecisionDepartmentPersonList.py
...ecision/Decision_getSourceDecisionDepartmentPersonList.py
+0
-3
bt5/erp5_decision/SkinTemplateItem/portal_skins/erp5_decision/Decision_notifySourceDecisionValue.py
...skins/erp5_decision/Decision_notifySourceDecisionValue.py
+2
-2
bt5/erp5_decision/SkinTemplateItem/portal_skins/erp5_decision/Decision_updateRelatedDocument.py
...tal_skins/erp5_decision/Decision_updateRelatedDocument.py
+0
-23
bt5/erp5_decision/WorkflowTemplateItem/portal_workflow/decision_interaction_workflow/scripts/Decision_decideDecisionLineList.py
...ction_workflow/scripts/Decision_decideDecisionLineList.py
+0
-3
No files found.
bt5/erp5_decision/SkinTemplateItem/portal_skins/erp5_decision/Decision_afterGeneration.py
View file @
5060228a
"""
"""
This script is called by builder after a Decision is generated by simulation.
This script is called by builder after a Decision is generated by simulation.
"""
"""
'''
class MyException(Exception):
pass
raise MyException('ptk: got here!')
'''
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
isTransitionPossible
=
portal
.
portal_workflow
.
isTransitionPossible
isTransitionPossible
=
portal
.
portal_workflow
.
isTransitionPossible
decision
=
context
decision
=
context
...
@@ -17,14 +12,6 @@ if isTransitionPossible(decision, 'post'):
...
@@ -17,14 +12,6 @@ if isTransitionPossible(decision, 'post'):
# set some meaningful title
# set some meaningful title
action_type
=
'Approval'
action_type
=
'Approval'
'''
trade_phase = decision.getTradePhase()
if trade_phase=='contract/approve/initiator':
# initial phase is called Validation
action_type = 'Validation'
elif trade_phase=='contract/approve/legal':
action_type = 'Approval'
'''
title
=
'%s by %s'
%
(
action_type
,
source_decision_value
.
getTitle
())
title
=
'%s by %s'
%
(
action_type
,
source_decision_value
.
getTitle
())
decision
.
setTitle
(
title
)
decision
.
setTitle
(
title
)
...
...
bt5/erp5_decision/SkinTemplateItem/portal_skins/erp5_decision/Decision_getSourceDecisionDepartmentPersonList.py
View file @
5060228a
"""
"""
List persons per division.
List persons per division.
"""
"""
from
AccessControl
import
getSecurityManager
source_value
=
context
.
getSourceDecisionValue
()
source_value
=
context
.
getSourceDecisionValue
()
...
@@ -10,10 +9,8 @@ source_type = source_value.getPortalType()
...
@@ -10,10 +9,8 @@ source_type = source_value.getPortalType()
if
source_type
==
'Organisation'
:
if
source_type
==
'Organisation'
:
organisation
=
source_value
organisation
=
source_value
elif
source_type
==
'Person'
:
elif
source_type
==
'Person'
:
#raise MyException('source type:' + source_type)
organisation
=
source_value
.
getCareerSubordinationValue
()
organisation
=
source_value
.
getCareerSubordinationValue
()
else
:
else
:
#position
organisation
=
source_value
.
getSubordinationValue
()
organisation
=
source_value
.
getSubordinationValue
()
person_list
=
[]
person_list
=
[]
...
...
bt5/erp5_decision/SkinTemplateItem/portal_skins/erp5_decision/Decision_notifySourceDecisionValue.py
View file @
5060228a
...
@@ -8,7 +8,7 @@ def getPreferenceForUser(owner_id):
...
@@ -8,7 +8,7 @@ def getPreferenceForUser(owner_id):
Return Preference object for user
Return Preference object for user
"""
"""
preference_list
=
context
.
portal_preferences
.
searchFolder
(
preference_list
=
context
.
portal_preferences
.
searchFolder
(
portal_type
=
'Preference'
,
portal_type
=
'Preference'
,
owner
=
owner_id
)
owner
=
owner_id
)
preference_list
=
[
x
for
x
in
preference_list
if
x
.
getProperty
(
'preference_state'
,
'broken'
)
in
(
'enabled'
,
'global'
)]
preference_list
=
[
x
for
x
in
preference_list
if
x
.
getProperty
(
'preference_state'
,
'broken'
)
in
(
'enabled'
,
'global'
)]
if
len
(
preference_list
):
if
len
(
preference_list
):
...
@@ -43,5 +43,5 @@ if source_decision_value is not None:
...
@@ -43,5 +43,5 @@ if source_decision_value is not None:
for
reference
in
[
x
.
getReference
()
for
x
in
person_list
]:
for
reference
in
[
x
.
getReference
()
for
x
in
person_list
]:
context
.
portal_notifications
.
sendMessage
(
context
.
portal_notifications
.
sendMessage
(
recipient
=
reference
,
recipient
=
reference
,
subject
=
subject
,
subject
=
subject
,
message
=
message
)
message
=
message
)
bt5/erp5_decision/SkinTemplateItem/portal_skins/erp5_decision/Decision_updateRelatedDocument.py
View file @
5060228a
...
@@ -4,20 +4,12 @@
...
@@ -4,20 +4,12 @@
We need proxy roles as not always current approver has enough rights to change related Documents.
We need proxy roles as not always current approver has enough rights to change related Documents.
"""
"""
portal
=
context
.
getPortalObject
()
portal
=
context
.
getPortalObject
()
isTransitionPossible
=
portal
.
portal_workflow
.
isTransitionPossible
translate
=
portal
.
Base_translateString
translate
=
portal
.
Base_translateString
decision
=
context
decision
=
context
approval
=
decision
.
getApproval
()
approval
=
decision
.
getApproval
()
causality_value
=
decision
.
getCausalityValue
()
causality_value
=
decision
.
getCausalityValue
()
'''
class MyException(Exception):
pass
raise MyException(str(causality_value))
'''
if
causality_value
.
getPortalType
()
in
[
'Curation Request Line'
,
'Curation Request'
]:
if
causality_value
.
getPortalType
()
in
[
'Curation Request Line'
,
'Curation Request'
]:
if
approval
:
if
approval
:
...
@@ -30,18 +22,3 @@ if causality_value.getPortalType() in ['Curation Request Line', 'Curation Reques
...
@@ -30,18 +22,3 @@ if causality_value.getPortalType() in ['Curation Request Line', 'Curation Reques
portal
.
portal_workflow
.
doActionFor
(
causality_value
,
portal
.
portal_workflow
.
doActionFor
(
causality_value
,
'invalidate_action'
,
'invalidate_action'
,
comment
=
translate
(
'validation refused'
),
**
kw
)
comment
=
translate
(
'validation refused'
),
**
kw
)
'''
if not approval:
# cancel all other pending decisions if one is refused
other_decision_list = [x for x in causality_value.CurationRequest_getDecisionList()
\
if x.getSimulationState()!='decided' and x!=decision]
for other_decision in other_decision_list:
if isTransitionPossible(other_decision, 'cancel_action'):
portal.portal_workflow.doActionFor(other_decision,
'cancel_action',
comment = translate('Canceled due to other decision rejection.'), **kw)
# invalidate the curation request
portal.portal_workflow.doActionFor(causality_value,
'invalidate_action',
comment = translate('Invalidated due to a decision rejection'), **kw)
'''
bt5/erp5_decision/WorkflowTemplateItem/portal_workflow/decision_interaction_workflow/scripts/Decision_decideDecisionLineList.py
View file @
5060228a
...
@@ -11,6 +11,3 @@ for decision_line in decision.contentValues(filter = {'portal_type': 'Decision L
...
@@ -11,6 +11,3 @@ for decision_line in decision.contentValues(filter = {'portal_type': 'Decision L
decision_line
.
decide
()
decision_line
.
decide
()
#context.activate().Base_notifyDecisionStateChange(decision.getCausalityUid(), decision.getUid())
#context.activate().Base_notifyDecisionStateChange(decision.getCausalityUid(), decision.getUid())
# update related document for decision
# decision.Decision_updateRelatedDocument()
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