Commit 2ff4d690 authored by wenjie.zheng's avatar wenjie.zheng Committed by Sebastien Robin

lazy_class.py: deploy universal workflow method initilization function.

parent 0fcb2746
......@@ -27,7 +27,7 @@ from Products.ERP5Type.Accessor.Constant import Getter as ConstantGetter
from Products.ERP5Type.Globals import InitializeClass
from Products.ERP5Type.Base import Base as ERP5Base
from . import aq_method_lock
from Products.ERP5Type.Base import PropertyHolder, initializePortalTypeDynamicWorkflowMethods, initializePortalTypeERP5WorkflowMethod
from Products.ERP5Type.Base import PropertyHolder, initializePortalTypeWorkflowMethods
from Products.ERP5Type.Utils import UpperCase
from Products.ERP5Type.Core.CategoryProperty import CategoryProperty
from ExtensionClass import ExtensionClass, pmc_init_of
......@@ -280,8 +280,6 @@ class PortalTypeMetaClass(GhostBaseMetaClass, PropertyHolder):
category_id,
category_tool)
###= Compatibility mode ====================================================
portal_workflow = getattr(site, 'portal_workflow', None)
if portal_workflow is None:
......@@ -290,9 +288,7 @@ class PortalTypeMetaClass(GhostBaseMetaClass, PropertyHolder):
"Could not generate workflow methods for %s"
% cls.__name__)
else:
initializePortalTypeDynamicWorkflowMethods(cls, portal_workflow)
initializePortalTypeERP5WorkflowMethod(cls, portal_workflow)
### =================================================== Compatibility Mode =
initializePortalTypeWorkflowMethods(cls, portal_workflow)
# portal type group methods, isNodeType, isResourceType...
from Products.ERP5Type.ERP5Type import ERP5TypeInformation
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment