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
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5
Commits
2f6a15cb
Commit
2f6a15cb
authored
Dec 11, 2014
by
wenjie.zheng
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lazy_class: Universal class initializer for ERP5Workflow.
parent
6d25df3a
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
13 deletions
+18
-13
product/ERP5Type/dynamic/lazy_class.py
product/ERP5Type/dynamic/lazy_class.py
+18
-13
No files found.
product/ERP5Type/dynamic/lazy_class.py
View file @
2f6a15cb
...
@@ -267,11 +267,16 @@ class PortalTypeMetaClass(GhostBaseMetaClass, PropertyHolder):
...
@@ -267,11 +267,16 @@ class PortalTypeMetaClass(GhostBaseMetaClass, PropertyHolder):
initializePortalTypeDynamicWorkflowMethods
(
cls
,
portal_workflow
)
initializePortalTypeDynamicWorkflowMethods
(
cls
,
portal_workflow
)
# ================== Workflow5 Project, Wenjie, Dec 2014 =======================
# ================== Workflow5 Project, Wenjie, Dec 2014 =======================
#raise NotImplementedError (cls.__name__) # Category Property
### the ERP5Workflow list is defined in ERP5Type, only try to get erp5workflow
### the ERP5Workflow list is defined in ERP5Type, only try to get erp5workflow
### when it's an erp5workflow related type.
### when it's an erp5workflow related type.
portal_type
=
site
.
getDefaultModule
(
portal_type
=
"portal_types"
)
if
cls
.
__name__
==
"Object Type"
:
### try to get workflow_list from related types then initialize the class of types
try
:
pt
=
portal_type
.
_getOb
(
cls
.
__name__
)
#raise NotImplemented (pt)
if
hasattr
(
pt
,
'workflow_list'
):
#if cls.__name__ == "Object Type": # Has to be redifined
portal_workflow5
=
site
.
getDefaultModule
(
portal_type
=
"Workflow"
)
portal_workflow5
=
site
.
getDefaultModule
(
portal_type
=
"Workflow"
)
#raise NotImplementedError (portal_workflow5) #<Workflow Module at workflow_module>
#raise NotImplementedError (portal_workflow5) #<Workflow Module at workflow_module>
#raise NotImplementedError (cls.__module__) #<class 'erp5.portal_type.Category Property'>
#raise NotImplementedError (cls.__module__) #<class 'erp5.portal_type.Category Property'>
...
@@ -281,8 +286,8 @@ class PortalTypeMetaClass(GhostBaseMetaClass, PropertyHolder):
...
@@ -281,8 +286,8 @@ class PortalTypeMetaClass(GhostBaseMetaClass, PropertyHolder):
%
cls
.
__name__
)
%
cls
.
__name__
)
else
:
else
:
intializePortalTypeERP5WorkflowMethod
(
cls
,
portal_workflow5
)
intializePortalTypeERP5WorkflowMethod
(
cls
,
portal_workflow5
)
except
:
pass
# ================== WF5 =======================================================
# ================== WF5 =======================================================
# portal type group methods, isNodeType, isResourceType...
# portal type group methods, isNodeType, isResourceType...
...
...
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