Commit 1b9fc90d authored by Aurel's avatar Aurel

add missing function to return Message

do not setattr manage_object_workspace on Folder as it generates attribute error
on func code


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@16528 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent de36b7e0
...@@ -80,6 +80,8 @@ from zLOG import LOG, PROBLEM, WARNING ...@@ -80,6 +80,8 @@ from zLOG import LOG, PROBLEM, WARNING
import warnings import warnings
REINDEX_SPLIT_COUNT = 100 # if folder containes more than this, reindexing should be splitted. REINDEX_SPLIT_COUNT = 100 # if folder containes more than this, reindexing should be splitted.
from Products.ERP5Type.Message import Message
N_ = lambda msgid, **kw: Message('ui', msgid, **kw)
# Dummy Functions for update / upgrade # Dummy Functions for update / upgrade
def dummyFilter(object,REQUEST=None): def dummyFilter(object,REQUEST=None):
...@@ -1266,10 +1268,11 @@ candidate_method_id_list = [] ...@@ -1266,10 +1268,11 @@ candidate_method_id_list = []
for folder_class in (HBTreeFolder2Base, HBTreeFolder2, CMFHBTreeFolder): for folder_class in (HBTreeFolder2Base, HBTreeFolder2, CMFHBTreeFolder):
# exclude objectValues because it is redefined here # exclude objectValues because it is redefined here
# exclude get because it is not defined on OFSFolder # exclude get because it is not defined on OFSFolder
# exclude manage_main because it generates func_code attribute errors # exclude manage_main/manage_object_workspace because it
# generates func_code attribute errors
candidate_method_id_list.extend([x for x in folder_class.__dict__ candidate_method_id_list.extend([x for x in folder_class.__dict__
if callable(getattr(folder_class, x)) and not if callable(getattr(folder_class, x)) and not
x in ('__getattr__','__init__', 'get', 'objectValues', x in ('__getattr__','__init__', 'get', 'objectValues',
'manage_main')]) 'manage_main', 'manage_object_workspace')])
for method_id in candidate_method_id_list: for method_id in candidate_method_id_list:
setattr(Folder, method_id, FolderMethodWrapper(method_id)) setattr(Folder, method_id, FolderMethodWrapper(method_id))
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