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
Lukas Niegsch
erp5
Commits
22889579
Commit
22889579
authored
Jun 23, 2015
by
wenjie.zheng
Committed by
Sebastien Robin
Jul 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Workflow.py: showAsXML now has exactly same structure as DCWorkflow showAsXML.
parent
581d201c
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
5 deletions
+11
-5
product/ERP5Workflow/Document/Workflow.py
product/ERP5Workflow/Document/Workflow.py
+11
-5
No files found.
product/ERP5Workflow/Document/Workflow.py
View file @
22889579
...
@@ -898,8 +898,8 @@ class Workflow(IdAsReferenceMixin("workflow_", "prefix"), XMLObject):
...
@@ -898,8 +898,8 @@ class Workflow(IdAsReferenceMixin("workflow_", "prefix"), XMLObject):
transition_list
=
self
.
objectValues
(
portal_type
=
'Transition'
)
transition_list
=
self
.
objectValues
(
portal_type
=
'Transition'
)
transition_prop_id_to_show
=
[
'title'
,
'description'
,
'new_state_id'
,
transition_prop_id_to_show
=
[
'title'
,
'description'
,
'new_state_id'
,
'trigger_type'
,
'script_name'
,
'after_script_name'
,
'actbox_category'
,
'trigger_type'
,
'script_name'
,
'after_script_name'
,
'actbox_category'
,
'actbox_icon'
,
'actbox_name'
,
'actbox_url'
,
'role
_list'
,
'group_list
'
,
'actbox_icon'
,
'actbox_name'
,
'actbox_url'
,
'role
s'
,
'groups
'
,
'permission
_list'
,
'expression
'
]
'permission
s'
,
'expr
'
]
for
tdef
in
self
.
objectValues
(
portal_type
=
'Transition'
):
for
tdef
in
self
.
objectValues
(
portal_type
=
'Transition'
):
transition_reference_list
.
append
(
tdef
.
getReference
())
transition_reference_list
.
append
(
tdef
.
getReference
())
transitions
=
SubElement
(
workflow
,
'transitions'
,
transitions
=
SubElement
(
workflow
,
'transitions'
,
...
@@ -932,9 +932,15 @@ class Workflow(IdAsReferenceMixin("workflow_", "prefix"), XMLObject):
...
@@ -932,9 +932,15 @@ class Workflow(IdAsReferenceMixin("workflow_", "prefix"), XMLObject):
property_value
=
self
.
_getOb
(
tdef
.
getAfterScriptIdList
()[
0
]).
getReference
()
property_value
=
self
.
_getOb
(
tdef
.
getAfterScriptIdList
()[
0
]).
getReference
()
sub_object
=
SubElement
(
transition
,
property_id
,
attrib
=
dict
(
type
=
'string'
))
sub_object
=
SubElement
(
transition
,
property_id
,
attrib
=
dict
(
type
=
'string'
))
# show guard configuration:
# show guard configuration:
elif
property_id
in
(
'role_list'
,
'group_list'
,
'permission_list'
,
elif
property_id
in
(
'roles'
,
'groups'
,
'permissions'
,
'expr'
,):
'expression'
,):
if
property_id
==
'roles'
:
property_value
=
tdef
.
getProperty
(
property_id
)
property_value
=
tdef
.
getRoleList
()
if
property_id
==
'groups'
:
property_value
=
tdef
.
getGroupList
()
if
property_id
==
'permissions'
:
property_value
=
tdef
.
getPermissionList
()
if
property_id
==
'expr'
:
property_value
=
tdef
.
getExpression
()
if
property_value
is
None
or
property_value
==
[]:
if
property_value
is
None
or
property_value
==
[]:
property_value
=
''
property_value
=
''
sub_object
=
SubElement
(
guard
,
property_id
,
attrib
=
dict
(
type
=
'guard configuration'
))
sub_object
=
SubElement
(
guard
,
property_id
,
attrib
=
dict
(
type
=
'guard configuration'
))
...
...
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