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
1
Issues
1
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
Roque
erp5
Commits
4769b139
Commit
4769b139
authored
Jun 30, 2015
by
wenjie.zheng
Committed by
Sebastien Robin
Jul 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
patches/DCWorkflow.py: transition variable show as XML.
parent
035a622b
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
1 deletion
+10
-1
product/ERP5Type/patches/DCWorkflow.py
product/ERP5Type/patches/DCWorkflow.py
+10
-1
No files found.
product/ERP5Type/patches/DCWorkflow.py
View file @
4769b139
...
...
@@ -888,7 +888,7 @@ def DCWorkflowDefinition_showAsXML(self, root=None):
transition_prop_id_to_show
=
{
'title'
:
'string'
,
'description'
:
'text'
,
'new_state_id'
:
'string'
,
'trigger_type'
:
'int'
,
'script_name'
:
'string'
,
'after_script_name'
:
'string'
,
'actbox_category'
:
'string'
,
'actbox_icon'
:
'string'
,
'actbox_name'
:
'string'
,
'actbox_url'
:
'string'
,
'guard'
:
'string'
}
'actbox_name'
:
'string'
,
'actbox_url'
:
'string'
,
'guard'
:
'string'
,
'transition_variable'
:
'object'
}
for
tid
in
transition_id_list
:
transition_reference_list
.
append
(
tid
)
...
...
@@ -900,6 +900,7 @@ def DCWorkflowDefinition_showAsXML(self, root=None):
transition
=
SubElement
(
transitions
,
'transition'
,
attrib
=
dict
(
reference
=
tid
,
portal_type
=
'Transition'
))
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
==
'guard'
:
guard_obj
=
getattr
(
tdef
,
'guard'
,
None
)
...
...
@@ -915,6 +916,14 @@ def DCWorkflowDefinition_showAsXML(self, root=None):
if
prop_value
is
None
or
prop_value
==
[]
or
prop_value
==
():
prop_value
=
''
sub_object
.
text
=
str
(
prop_value
)
elif
property_id
==
'transition_variable'
:
if
tdef
.
var_exprs
is
not
None
:
tr_var_list
=
tdef
.
var_exprs
else
:
tr_var_list
=
{}
for
tr_var
in
tr_var_list
:
transition_variable
=
SubElement
(
transition_variables
,
property_id
,
attrib
=
dict
(
id
=
tr_var
,
type
=
'variable'
))
transition_variable
.
text
=
str
(
tr_var_list
[
tr_var
].
text
)
else
:
property_value
=
getattr
(
tdef
,
property_id
)
property_type
=
transition_prop_id_to_show
[
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