Commit 5b8375cd authored by Sebastien Robin's avatar Sebastien Robin

added a log when _aq_dynamic fails, this prevent from doing error on propertySheets


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@1817 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 5d3abbc3
......@@ -37,7 +37,6 @@ from Products.CMFCore.utils import getToolByName
from Products.DCWorkflow.Transitions import TRIGGER_WORKFLOW_METHOD
from Products.CMFActivity.ActiveObject import ActiveObject
from Products.ERP5Type import _dtmldir
from Products.ERP5Type import PropertySheet
......@@ -53,6 +52,7 @@ from ZopePatch import ERP5PropertyManager
from CopySupport import CopyContainer
from Errors import DeferredCatalogError
from Products.CMFActivity.ActiveObject import ActiveObject
from string import join
import sys
......@@ -202,7 +202,10 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
global aq_method_generated
klass = self.__class__
if not aq_method_generated.has_key(klass):
try:
initializeDynamicProperties(self, klass)
except:
LOG('_aq_dynamic',0,'error', error=sys.exc_info())
return getattr(self, id)
return None
......@@ -945,6 +948,7 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
filter=None, portal_type=(), base=0):
self._getCategoryTool().setCategoryMembership(self, category, node_list,
spec=spec, filter=filter, portal_type=portal_type, base=base)
self.activate().edit() # Do nothing except call workflow method
security.declareProtected( Permissions.ModifyPortalContent, 'setCategoryMembership' )
def setCategoryMembership(self, category, node_list, spec=(), base=0):
......@@ -1495,6 +1499,14 @@ class Base( CopyContainer, PortalContent, ActiveObject, ERP5PropertyManager ):
# Compatibility with CMF Catalog / CPS sites
SearchableText = getSearchableText
security.declareProtected(Permissions.View, 'newError')
def newError(self, **kw):
"""
Create a new Error object
"""
from Products.ERP5Type.Error import Error
return Error(**kw)
InitializeClass(Base)
class TempBase(Base):
......
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