Commit 5383fe19 authored by wenjie.zheng's avatar wenjie.zheng

Workflow and Base: Fix new line marker from code mirror.

parent 3bcb3ef5
......@@ -109,7 +109,7 @@ _MARKER = []
global registered_workflow_method_set
wildcard_interaction_method_id_match = re.compile(r'[[.?*+{(\\]').search
workflow_method_registry = [] # XXX A set() would be better but would require a hash in WorkflowMethod class
erp5workflow_method_registry = []
erp5workflow_method_registry =[]
def resetRegisteredWorkflowMethod(portal_type=None):
"""
......@@ -219,7 +219,6 @@ class ERP5WorkflowMethod(Method):
if valid_list:
valid_transition_item_list.append((wf_id, valid_list))
### Execute method
for wf_id, transition_list in valid_transition_item_list:
for tr in transition_list:
method5 = wf5_module._getOb(wf_id)._getOb(tr)
......@@ -656,6 +655,8 @@ def getClassPropertyList(klass):
if p not in ps_list])
return ps_list
def intializePortalTypeERP5WorkflowMethod(ptype_klass, portal_ERP5Workflow):
### this function will be used in /product/ERP5Type/dynamic/lazy_class.py
### in generatePortalTypeAccessors()
......@@ -3631,6 +3632,4 @@ class TempBase(Base):
# Zope2.12 which requires us to call InitializeClass manually, otherwise
# allow_class(TempBase) in ERP5Type/Document/__init__.py will trample our
# ClassSecurityInfo with one that doesn't declare our public methods
InitializeClass(TempBase)
InitializeClass(TempBase)
\ No newline at end of file
##############################################################################
#
# Copyright (c) 2006,2014 Nexedi SARL and Contributors. All Rights Reserved.
# Copyright (c) 2006 Nexedi SARL and Contributors. All Rights Reserved.
# Romain Courteaud <romain@nexedi.com>
# Wenjie Zheng <wenjie.zheng@tiolive.com>
#
# WARNING: This program as such is intended to be used by professional
# programmers who take the whole responsability of assessing all potential
# consequences resulting from its eventual inadequacies and bugs
......@@ -52,6 +52,7 @@ class Workflow(XMLObject):
add_permission = Permissions.AddPortalContent
isPortalContent = 1
isRADContent = 1
# Declarative security
security = ClassSecurityInfo()
security.declareObjectProtected(Permissions.AccessContentsInformation)
......@@ -209,4 +210,4 @@ class Workflow(XMLObject):
',\\n'.join(v)))
out.append('}')
return '\n'.join(out)
return '\n'.join(out)
\ No newline at end of file
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