Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
erp5_workflow
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
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenjie.zheng
erp5_workflow
Commits
4ffafb6f
Commit
4ffafb6f
authored
Jul 13, 2015
by
wenjie.zheng
Committed by
Sebastien Robin
Jul 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5/InteractionWorkflow.py: fix null property_value in showAsXML.
parent
27be8c51
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
10 additions
and
3 deletions
+10
-3
product/ERP5/InteractionWorkflow.py
product/ERP5/InteractionWorkflow.py
+10
-3
No files found.
product/ERP5/InteractionWorkflow.py
View file @
4ffafb6f
...
@@ -379,6 +379,8 @@ class InteractionWorkflowDefinition (DCWorkflowDefinition, ActiveObject):
...
@@ -379,6 +379,8 @@ class InteractionWorkflowDefinition (DCWorkflowDefinition, ActiveObject):
for
prop_id
in
sorted
(
interaction_workflow_prop_id_to_show
):
for
prop_id
in
sorted
(
interaction_workflow_prop_id_to_show
):
prop_value
=
self
.
__dict__
[
prop_id
]
prop_value
=
self
.
__dict__
[
prop_id
]
if
prop_value
is
None
or
prop_value
==
[]
or
prop_value
==
():
prop_value
=
''
prop_type
=
interaction_workflow_prop_id_to_show
[
prop_id
]
prop_type
=
interaction_workflow_prop_id_to_show
[
prop_id
]
sub_object
=
SubElement
(
interaction_workflow
,
prop_id
,
attrib
=
dict
(
type
=
prop_type
))
sub_object
=
SubElement
(
interaction_workflow
,
prop_id
,
attrib
=
dict
(
type
=
prop_type
))
sub_object
.
text
=
str
(
prop_value
)
sub_object
.
text
=
str
(
prop_value
)
...
@@ -421,7 +423,10 @@ class InteractionWorkflowDefinition (DCWorkflowDefinition, ActiveObject):
...
@@ -421,7 +423,10 @@ class InteractionWorkflowDefinition (DCWorkflowDefinition, ActiveObject):
property_value
=
getattr
(
tdef
,
property_id
,
None
)
property_value
=
getattr
(
tdef
,
property_id
,
None
)
sub_object
=
SubElement
(
interaction
,
property_id
,
attrib
=
dict
(
type
=
'string'
))
sub_object
=
SubElement
(
interaction
,
property_id
,
attrib
=
dict
(
type
=
'string'
))
else
:
else
:
property_value
=
tdef
.
__dict__
[
property_id
]
if
property_id
in
tdef
.
__dict__
:
property_value
=
tdef
.
__dict__
[
property_id
]
else
:
property_value
=
''
property_type
=
interaction_prop_id_to_show
[
property_id
]
property_type
=
interaction_prop_id_to_show
[
property_id
]
sub_object
=
SubElement
(
interaction
,
property_id
,
attrib
=
dict
(
type
=
property_type
))
sub_object
=
SubElement
(
interaction
,
property_id
,
attrib
=
dict
(
type
=
property_type
))
if
property_value
is
None
or
property_value
==
[]
or
property_value
==
():
if
property_value
is
None
or
property_value
==
[]
or
property_value
==
():
...
@@ -429,8 +434,8 @@ class InteractionWorkflowDefinition (DCWorkflowDefinition, ActiveObject):
...
@@ -429,8 +434,8 @@ class InteractionWorkflowDefinition (DCWorkflowDefinition, ActiveObject):
if
property_id
in
[
'once_per_transaction'
,
'temporary_document_disallowed'
]:
if
property_id
in
[
'once_per_transaction'
,
'temporary_document_disallowed'
]:
if
property_value
==
True
:
if
property_value
==
True
:
property_value
=
'1'
property_value
=
'1'
elif
property_value
==
False
:
elif
property_value
==
False
or
property_value
is
''
:
property_value
=
'0'
property_value
=
'0'
sub_object
.
text
=
str
(
property_value
)
sub_object
.
text
=
str
(
property_value
)
# 2. Variable as XML
# 2. Variable as XML
...
@@ -486,6 +491,8 @@ class InteractionWorkflowDefinition (DCWorkflowDefinition, ActiveObject):
...
@@ -486,6 +491,8 @@ class InteractionWorkflowDefinition (DCWorkflowDefinition, ActiveObject):
property_value
=
getattr
(
sdef
,
property_id
)
property_value
=
getattr
(
sdef
,
property_id
)
property_type
=
script_prop_id_to_show
[
property_id
]
property_type
=
script_prop_id_to_show
[
property_id
]
sub_object
=
SubElement
(
script
,
property_id
,
attrib
=
dict
(
type
=
property_type
))
sub_object
=
SubElement
(
script
,
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
)
sub_object
.
text
=
str
(
property_value
)
# return xml object
# return xml object
...
...
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