Commit cf676c85 authored by Nicolas Dumazet's avatar Nicolas Dumazet

set name on property_holder, and pass along context to setDefaultProperties


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@42406 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 8731f49c
......@@ -188,7 +188,9 @@ class PropertySheetTool(BaseTool):
setDefaultClassProperties(property_holder)
try:
setDefaultProperties(property_holder, portal=self.getPortalObject())
setDefaultProperties(property_holder,
object=self,
portal=self.getPortalObject())
except:
LOG("Tool.PropertySheetTool", ERROR,
"Could not generate accessor holder class for %s (module=%s)" % \
......@@ -269,9 +271,12 @@ class PropertySheetTool(BaseTool):
property_holder._categories, \
property_holder._constraints = definition_tuple
property_sheet_name = property_sheet.getId()
property_holder.__name__ = property_sheet_name
return self._createCommonPropertySheetAccessorHolder(
property_holder,
property_sheet.getId(),
property_sheet_name,
'erp5.accessor_holder')
security.declareProtected(Permissions.ManagePortal,
......
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