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
iv
erp5
Commits
45b508a0
Commit
45b508a0
authored
Sep 27, 2016
by
iv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Workflow: same but cleaner way without storage_id
parent
59ec192a
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
product/ERP5/ERP5Site.py
product/ERP5/ERP5Site.py
+2
-2
product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/State/state_type_property.xml
...Item/portal_property_sheets/State/state_type_property.xml
+3
-1
product/ERP5Type/patches/DCWorkflow.py
product/ERP5Type/patches/DCWorkflow.py
+3
-0
No files found.
product/ERP5/ERP5Site.py
View file @
45b508a0
...
...
@@ -774,7 +774,7 @@ class ERP5Site(FolderMixIn, CMFSite, CacheCookieMixin):
state_list
=
[]
for
wf
in
self
.
portal_workflow
.
objectValues
():
for
state
in
wf
.
getStateValueList
():
if
group
in
getattr
(
state
,
'type_list'
,
()
):
if
group
in
state
.
getStateTypeList
(
):
state_list
.
append
(
state
.
getReference
())
return
tuple
(
state_list
)
...
...
@@ -1300,7 +1300,7 @@ class ERP5Site(FolderMixIn, CMFSite, CacheCookieMixin):
for
wf
in
self
.
portal_workflow
.
objectValues
():
if
wf
.
getVariableValueDict
()
and
wf
.
getStateVariable
()
==
'simulation_state'
:
for
state
in
wf
.
getStateValueList
():
if
getattr
(
state
,
'type_list'
,
None
):
if
state
.
getStateTypeList
(
):
state_list
.
append
(
state
.
getReference
())
return
tuple
(
sorted_list
)
...
...
product/ERP5/bootstrap/erp5_property_sheets/PropertySheetTemplateItem/portal_property_sheets/State/state_type_property.xml
View file @
45b508a0
...
...
@@ -38,7 +38,9 @@
</item>
<item>
<key>
<string>
storage_id
</string>
</key>
<value>
<string>
type_list
</string>
</value>
<value>
<none/>
</value>
</item>
</dictionary>
</pickle>
...
...
product/ERP5Type/patches/DCWorkflow.py
View file @
45b508a0
...
...
@@ -843,6 +843,8 @@ def DCWorkflowDefinition_getScriptValueList(self):
return
[]
def
StateDefinition_getDestinationIdList
(
self
):
return
self
.
transitions
def
StateDefinition_getStateTypeList
(
self
):
return
getattr
(
self
,
'type_list'
,
())
def
DCWorkflowDefinition_getPortalType
(
self
):
return
self
.
__class__
.
__name__
def
method_getReference
(
self
):
...
...
@@ -1113,6 +1115,7 @@ StateDefinition.getReference = method_getReference
StateDefinition
.
getDestinationIdList
=
StateDefinition_getDestinationIdList
StateDefinition
.
getDestinationReferenceList
=
StateDefinition_getDestinationIdList
StateDefinition
.
showDict
=
DCWorkflowDefinition_showDict
StateDefinition
.
getStateTypeList
=
StateDefinition_getStateTypeList
TransitionDefinition
.
getParentValue
=
TransitionDefinition_getParentValue
TransitionDefinition
.
getReference
=
method_getReference
TransitionDefinition
.
showDict
=
DCWorkflowDefinition_showDict
...
...
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