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
68f23ad5
Commit
68f23ad5
authored
Apr 28, 2015
by
wenjie.zheng
Committed by
Sebastien Robin
Jul 16, 2015
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
lazy_class.py: modify workflow getter since workflow_module has been merged with portal_workflow.
parent
a25db37d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
18 deletions
+3
-18
product/ERP5Type/dynamic/lazy_class.py
product/ERP5Type/dynamic/lazy_class.py
+3
-18
No files found.
product/ERP5Type/dynamic/lazy_class.py
View file @
68f23ad5
...
@@ -282,31 +282,16 @@ class PortalTypeMetaClass(GhostBaseMetaClass, PropertyHolder):
...
@@ -282,31 +282,16 @@ class PortalTypeMetaClass(GhostBaseMetaClass, PropertyHolder):
###= Compatibility mode ====================================================
###= Compatibility mode ====================================================
portal_workflow
=
getattr
(
site
,
'portal_workflow'
,
None
)
if
hasattr
(
site
,
'portal_workflow'
):
if
portal_workflow
is
None
:
portal_workflow
=
site
.
portal_workflow
elif
hasattr
(
site
,
'portal_workflow_old'
):
portal_workflow
=
site
.
portal_workflow_old
else
:
portal_workflow
=
None
#portal_workflow = site.portal_workflow
workflow_module
=
getattr
(
site
,
'workflow_module'
,
None
)
portal_types
=
site
.
getDefaultModule
(
portal_type
=
"portal_types"
)
object_ptype
=
portal_types
.
_getOb
(
cls
.
__name__
,
None
)
if
portal_workflow
is
None
and
workflow_module
is
None
:
if
not
getattr
(
site
,
'_v_bootstrapping'
,
False
):
if
not
getattr
(
site
,
'_v_bootstrapping'
,
False
):
LOG
(
"ERP5Type.Dynamic"
,
WARNING
,
LOG
(
"ERP5Type.Dynamic"
,
WARNING
,
"Could not generate workflow methods for %s"
"Could not generate workflow methods for %s"
%
cls
.
__name__
)
%
cls
.
__name__
)
else
:
else
:
initializePortalTypeDynamicWorkflowMethods
(
cls
,
portal_workflow
)
initializePortalTypeDynamicWorkflowMethods
(
cls
,
portal_workflow
)
### it seems at the creation, classes that don't belong to ERP5 object could
initializePortalTypeERP5WorkflowMethod
(
cls
,
portal_workflow
)
# be loaded, thus only erp5 object types can be initialized.
if
object_ptype
is
not
None
and
workflow_module
is
not
None
:
if
object_ptype
.
getTypeERP5WorkflowList
()
!=
[]:
initializePortalTypeERP5WorkflowMethod
(
cls
,
workflow_module
)
### =================================================== Compatibility Mode =
### =================================================== Compatibility Mode =
# 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