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
Alain Takoudjou
erp5
Commits
12531041
Commit
12531041
authored
Jun 25, 2015
by
wenjie.zheng
Committed by
Sebastien Robin
Jul 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
InteractionWorkflow.py: improve showAsXML according to workflow showASXML.
parent
ef6822d7
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
8 deletions
+6
-8
product/ERP5Workflow/Document/InteractionWorkflow.py
product/ERP5Workflow/Document/InteractionWorkflow.py
+6
-8
No files found.
product/ERP5Workflow/Document/InteractionWorkflow.py
View file @
12531041
...
...
@@ -234,7 +234,7 @@ class InteractionWorkflow(IdAsReferenceMixin("interactionworkflow_", "prefix"),
history_key
=
self
.
unrestrictedTraverse
(
self
.
getRelativeUrl
()).
getReference
()
return
history_key
security
.
declarePrivate
(
'get
Worklist
VariableMatchDict'
)
security
.
declarePrivate
(
'get
interaction_workflow
VariableMatchDict'
)
def
getWorklistVariableMatchDict
(
self
,
info
,
check_guard
=
True
):
return
None
...
...
@@ -516,8 +516,8 @@ class InteractionWorkflow(IdAsReferenceMixin("interactionworkflow_", "prefix"),
# 2. Variable as XML
variable_reference_list
=
[]
variable_list
=
self
.
objectValues
(
portal_type
=
'Variable'
)
variable_prop_id_to_show
=
[
'description'
,
'default_expr'
,
'for_catalog'
,
'for_status'
,
'update_always'
]
variable_prop_id_to_show
=
[
'description'
,
'default_expr'
,
'for_
catalog'
,
'for_
status'
,
'update_always'
]
for
vdef
in
variable_list
:
variable_reference_list
.
append
(
vdef
.
getReference
())
variables
=
SubElement
(
interaction_workflow
,
'variables'
,
attrib
=
dict
(
variable_list
=
str
(
variable_reference_list
),
...
...
@@ -533,21 +533,19 @@ class InteractionWorkflow(IdAsReferenceMixin("interactionworkflow_", "prefix"),
property_value
=
vdef
.
getInitialValue
()
if
vdef
.
getInitialValue
()
is
not
None
:
property_value
=
vdef
.
getInitialValue
()
else
:
property_value
=
''
sub_object
=
SubElement
(
variable
,
property_id
,
attrib
=
dict
(
type
=
'string'
))
else
:
property_value
=
vdef
.
getProperty
(
property_id
)
if
property_value
is
None
:
property_value
=
''
property_type
=
vdef
.
getPropertyType
(
property_id
)
sub_object
=
SubElement
(
variable
,
property_id
,
attrib
=
dict
(
type
=
property_type
))
if
property_value
is
None
or
property_value
==
()
or
property_value
==
[]:
property_value
=
''
sub_object
.
text
=
str
(
property_value
)
# 3. Script as XML
script_reference_list
=
[]
script_list
=
self
.
objectValues
(
portal_type
=
'Workflow Script'
)
script_prop_id_to_show
=
sorted
([
'
title'
,
'
body'
,
'parameter_signature'
])
script_prop_id_to_show
=
sorted
([
'body'
,
'parameter_signature'
])
for
sdef
in
script_list
:
script_reference_list
.
append
(
sdef
.
getReference
())
scripts
=
SubElement
(
interaction_workflow
,
'scripts'
,
attrib
=
dict
(
script_list
=
str
(
script_reference_list
),
...
...
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