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
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
iv
erp5
Commits
3a927433
Commit
3a927433
authored
Sep 15, 2016
by
iv
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ERP5Workflow: ConfigurationWorkflow class now inheritates from Workflow
remove duplicated code
parent
a5e8cb08
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
23 deletions
+3
-23
product/ERP5Workflow/Document/ConfigurationWorkflow.py
product/ERP5Workflow/Document/ConfigurationWorkflow.py
+2
-21
product/ERP5Workflow/Document/Workflow.py
product/ERP5Workflow/Document/Workflow.py
+1
-2
No files found.
product/ERP5Workflow/Document/ConfigurationWorkflow.py
View file @
3a927433
...
...
@@ -29,7 +29,7 @@
from
AccessControl
import
ClassSecurityInfo
from
Products.ERP5Type
import
Permissions
,
PropertySheet
from
Products.ERP5
Type.XMLObject
import
XMLObject
from
Products.ERP5
Workflow.Document.Workflow
import
Workflow
from
Products.ERP5Type.Globals
import
PersistentMapping
from
tempfile
import
mktemp
...
...
@@ -41,7 +41,7 @@ from Acquisition import aq_base
from
DateTime
import
DateTime
class
ConfigurationWorkflow
(
XMLObject
):
class
ConfigurationWorkflow
(
Workflow
):
"""
A Business Configuration Workflow.
"""
...
...
@@ -120,25 +120,6 @@ class ConfigurationWorkflow(XMLObject):
result
=
document
.
workflow_history
[
workflow_key
][
-
1
].
copy
()
return
result
def
getDateTime
(
self
):
"""
Return current date time.
"""
return
DateTime
()
def
getStateChangeInformation
(
self
,
document
,
state
,
transition
=
None
):
"""
Return an object used for variable tales expression.
"""
if
transition
is
None
:
transition_url
=
None
else
:
transition_url
=
transition
.
getRelativeUrl
()
return
self
.
asContext
(
document
=
document
,
transition
=
transition
,
transition_url
=
transition_url
,
state
=
state
)
def
_getWorkflowStateOf
(
self
,
ob
,
id_only
=
0
):
tool
=
self
.
getPortalObject
().
portal_workflow
id
=
self
.
getId
()
...
...
product/ERP5Workflow/Document/Workflow.py
View file @
3a927433
...
...
@@ -115,8 +115,7 @@ class Workflow(IdAsReferenceMixin("", "prefix"), XMLObject):
"""
Generate a key used in the workflow history.
"""
history_key
=
self
.
getReference
()
return
history_key
return
self
.
getReference
()
def
_updateWorkflowHistory
(
self
,
document
,
status_dict
):
"""
...
...
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