Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5-Boxiang
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
Hamza
erp5-Boxiang
Commits
1b7f9ef4
Commit
1b7f9ef4
authored
Jun 30, 2015
by
wenjie.zheng
Committed by
Sebastien Robin
Jul 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Workflow.py: transition variable show as XML.
parent
4769b139
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
1 deletion
+8
-1
product/ERP5Workflow/Document/Workflow.py
product/ERP5Workflow/Document/Workflow.py
+8
-1
No files found.
product/ERP5Workflow/Document/Workflow.py
View file @
1b7f9ef4
...
...
@@ -810,7 +810,7 @@ class Workflow(IdAsReferenceMixin("workflow_", "prefix"), XMLObject):
transition_prop_id_to_show
=
[
'title'
,
'description'
,
'new_state_id'
,
'trigger_type'
,
'script_name'
,
'after_script_name'
,
'actbox_category'
,
'actbox_icon'
,
'actbox_name'
,
'actbox_url'
,
'roles'
,
'groups'
,
'permissions'
,
'expr'
]
'permissions'
,
'expr'
,
'transition_variable'
]
for
tdef
in
self
.
objectValues
(
portal_type
=
'Transition'
):
transition_reference_list
.
append
(
tdef
.
getReference
())
transitions
=
SubElement
(
workflow
,
'transitions'
,
...
...
@@ -821,6 +821,7 @@ class Workflow(IdAsReferenceMixin("workflow_", "prefix"), XMLObject):
attrib
=
dict
(
reference
=
tdef
.
getReference
(),
portal_type
=
tdef
.
getPortalType
()))
guard
=
SubElement
(
transition
,
'guard'
,
attrib
=
dict
(
type
=
'object'
))
transition_variables
=
SubElement
(
transition
,
'transition_variables'
,
attrib
=
dict
(
type
=
'object'
))
for
property_id
in
sorted
(
transition_prop_id_to_show
):
if
property_id
in
(
'roles'
,
'groups'
,
'permissions'
,
'expr'
,):
if
property_id
==
'roles'
:
...
...
@@ -857,6 +858,12 @@ class Workflow(IdAsReferenceMixin("workflow_", "prefix"), XMLObject):
else
:
property_value
=
self
.
_getOb
(
tdef
.
getAfterScriptIdList
()[
0
]).
getReference
()
sub_object
=
SubElement
(
transition
,
property_id
,
attrib
=
dict
(
type
=
'string'
))
elif
property_id
==
'transition_variable'
:
tr_var_list
=
tdef
.
objectValues
(
portal_type
=
'Transition Variable'
)
for
tr_var
in
tr_var_list
:
reference
=
self
.
_getOb
(
tr_var
.
getCausalityId
()).
getReference
()
transition_variable
=
SubElement
(
transition_variables
,
property_id
,
attrib
=
dict
(
id
=
reference
,
type
=
'variable'
))
transition_variable
.
text
=
str
(
tr_var
.
getDefaultExpr
())
else
:
property_value
=
tdef
.
getProperty
(
property_id
)
property_type
=
tdef
.
getPropertyType
(
property_id
)
...
...
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