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
Hamza
erp5
Commits
e4a75d4e
Commit
e4a75d4e
authored
May 13, 2015
by
wenjie.zheng
Committed by
Sebastien Robin
Jul 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
WorkflowState.py: remove unused codes since universal method has been deployed.
parent
4cfc5377
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
9 deletions
+2
-9
product/ERP5Type/Accessor/WorkflowState.py
product/ERP5Type/Accessor/WorkflowState.py
+2
-9
No files found.
product/ERP5Type/Accessor/WorkflowState.py
View file @
e4a75d4e
...
...
@@ -57,11 +57,7 @@ class Getter(BaseGetter):
def
__call__
(
self
,
instance
):
portal_workflow
=
instance
.
getPortalObject
().
portal_workflow
wf
=
portal_workflow
.
getWorkflowById
(
self
.
_key
)
if
wf
.
getPortalType
()
in
[
'Workflow'
,
'Interaction Workflow'
]:
# remove id suffix for workflow and interaction workflow
return
'_'
.
join
(
wf
.
_getWorkflowStateOf
(
instance
,
id_only
=
1
).
split
(
'_'
)[
1
:])
else
:
return
wf
.
_getWorkflowStateOf
(
instance
,
id_only
=
1
)
return
wf
.
_getWorkflowStateOf
(
instance
,
id_only
=
1
)
psyco
.
bind
(
__call__
)
...
...
@@ -97,10 +93,7 @@ class TranslatedGetter(Getter):
def
__call__
(
self
,
instance
):
portal
=
instance
.
getPortalObject
()
wf
=
portal
.
portal_workflow
.
getWorkflowById
(
self
.
_key
)
if
wf
.
getPortalType
()
in
[
'Workflow'
,
'Interaction Workflow'
]:
state_id
=
'_'
.
join
(
wf
.
_getWorkflowStateOf
(
instance
,
id_only
=
1
).
split
(
'_'
)[
1
:])
else
:
state_id
=
wf
.
_getWorkflowStateOf
(
instance
,
id_only
=
1
)
state_id
=
wf
.
_getWorkflowStateOf
(
instance
,
id_only
=
1
)
warn
(
'Translated workflow state getters, such as %s are deprecated'
%
self
.
_id
,
DeprecationWarning
)
return
portal
.
Localizer
.
erp5_ui
.
gettext
(
state_id
).
encode
(
'utf8'
)
...
...
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